dotfiles with stow
This commit is contained in:
163
config/.config/kak/colors/catppuccin_macchiato.kak
Normal file
163
config/.config/kak/colors/catppuccin_macchiato.kak
Normal file
@@ -0,0 +1,163 @@
|
||||
# Catppuccin Macchiato theme for Kakoune
|
||||
#
|
||||
# Taken and adapted from
|
||||
# <https://github.com/catppuccin/kakoune/blob/e52fb5c95f70c297fea1fd58613284817b5a50bd/colors/catppuccin_macchiato.kak>
|
||||
|
||||
# Color palette
|
||||
declare-option str rosewater "rgb:f4dbd6"
|
||||
declare-option str red "rgb:ed8796"
|
||||
declare-option str mauve "rgb:c6a0f6"
|
||||
declare-option str maroon "rgb:ee99a0"
|
||||
declare-option str pink "rgb:f5bde6"
|
||||
declare-option str cyan "rgb:7dc4e4"
|
||||
declare-option str yellow "rgb:eed49f"
|
||||
declare-option str green "rgb:a6da95"
|
||||
declare-option str white "rgb:cad3f5"
|
||||
declare-option str blue "rgb:8aadf4"
|
||||
declare-option str sky "rgb:91d7e3"
|
||||
declare-option str lavender "rgb:b7bdf8"
|
||||
declare-option str black1 "rgb:1e2030"
|
||||
declare-option str black2 "rgb:24273a"
|
||||
declare-option str black3 "rgb:363a4f"
|
||||
declare-option str orange "rgb:f5a97f"
|
||||
declare-option str teal "rgb:8bd5ca"
|
||||
declare-option str flamingo "rgb:f0c6c6"
|
||||
declare-option str gray0 "rgb:5b6078"
|
||||
declare-option str gray1 "rgb:6e738d"
|
||||
declare-option str bright_red "%opt{red}+b"
|
||||
declare-option str bright_green "%opt{green}+b"
|
||||
declare-option str bright_yellow "%opt{yellow}+b"
|
||||
declare-option str bright_blue "%opt{blue}+b"
|
||||
declare-option str bright_cyan "%opt{cyan}+b"
|
||||
declare-option str bright_white "%opt{white}+b"
|
||||
declare-option str foreground %opt{white}
|
||||
declare-option str background %opt{black2}
|
||||
declare-option str overlay0 "rgb:8087a2"
|
||||
declare-option str overlay1 "rgb:939ab7"
|
||||
|
||||
# Markup
|
||||
set-face global title "%opt{rosewater}"
|
||||
set-face global header "%opt{bright_red}"
|
||||
set-face global bold "%opt{mauve}"
|
||||
set-face global italic "%opt{lavender}"
|
||||
set-face global mono "%opt{green}"
|
||||
set-face global block "%opt{cyan}"
|
||||
set-face global link "%opt{green}"
|
||||
set-face global bullet "%opt{green}"
|
||||
set-face global list "%opt{white}"
|
||||
|
||||
# Builtins
|
||||
set-face global Default "%opt{white},%opt{background}"
|
||||
set-face global PrimarySelection "%opt{gray0},%opt{lavender}"
|
||||
set-face global SecondarySelection "%opt{lavender},%opt{gray0}"
|
||||
set-face global PrimaryCursor "%opt{background},%opt{rosewater}"
|
||||
set-face global SecondaryCursor "%opt{black1},%opt{teal}"
|
||||
set-face global PrimaryCursorEol "%opt{gray0},%opt{mauve}"
|
||||
set-face global SecondaryCursorEol "%opt{gray0},%opt{maroon}"
|
||||
set-face global LineNumbers "%opt{gray1},%opt{background}"
|
||||
set-face global LineNumberCursor "%opt{lavender},%opt{gray0}+b"
|
||||
set-face global LineNumbersWrapped "%opt{teal},%opt{black1}+i"
|
||||
set-face global MenuForeground "%opt{white},%opt{gray0}+b"
|
||||
set-face global MenuBackground "%opt{white},%opt{black3}"
|
||||
set-face global MenuInfo "%opt{black1},%opt{blue}"
|
||||
set-face global Information "%opt{black1},%opt{lavender}"
|
||||
set-face global Error "%opt{red},%opt{black2}"
|
||||
set-face global StatusLine "%opt{white},%opt{black1}"
|
||||
set-face global StatusLineMode "%opt{black2},%opt{yellow}"
|
||||
set-face global StatusLineInfo "%opt{background},%opt{green}"
|
||||
set-face global StatusLineValue "%opt{orange},%opt{gray0}"
|
||||
set-face global StatusCursor "%opt{black1},%opt{lavender}"
|
||||
set-face global Prompt "%opt{green},%opt{black2}"
|
||||
set-face global MatchingChar "%opt{maroon},%opt{black2}"
|
||||
set-face global Whitespace "%opt{gray1},%opt{background}+f"
|
||||
set-face global WrapMarker Whitespace
|
||||
set-face global BufferPadding "%opt{background},%opt{background}"
|
||||
|
||||
# Code
|
||||
set-face global value "%opt{orange}"
|
||||
set-face global type "%opt{rosewater}"
|
||||
set-face global variable "%opt{white}"
|
||||
set-face global module "%opt{maroon}"
|
||||
set-face global function "%opt{sky}"
|
||||
set-face global string "%opt{green}"
|
||||
set-face global keyword "%opt{blue}"
|
||||
set-face global operator "%opt{blue}"
|
||||
set-face global attribute "%opt{green}"
|
||||
set-face global comment "%opt{gray1}+i"
|
||||
set-face global documentation comment
|
||||
set-face global meta "%opt{pink}"
|
||||
set-face global builtin "%opt{lavender}+b"
|
||||
|
||||
# Tree-sitter (<https://git.sr.ht/~hadronized/kak-tree-sitter>)
|
||||
set-face global ts_attribute "%opt{blue}"
|
||||
set-face global ts_comment "%opt{overlay0}+i"
|
||||
set-face global ts_conceal "%opt{mauve}+i"
|
||||
set-face global ts_constant "%opt{orange}"
|
||||
set-face global ts_constant_builtin_boolean "%opt{sky}"
|
||||
set-face global ts_constant_character "%opt{yellow}"
|
||||
set-face global ts_constant_macro "%opt{mauve}"
|
||||
set-face global ts_constructor "%opt{cyan}"
|
||||
set-face global ts_diff_plus "%opt{green}"
|
||||
set-face global ts_diff_minus "%opt{red}"
|
||||
set-face global ts_diff_delta "%opt{blue}"
|
||||
set-face global ts_diff_delta_moved "%opt{mauve}"
|
||||
set-face global ts_error "%opt{red}+b"
|
||||
set-face global ts_function "%opt{blue}"
|
||||
set-face global ts_function_builtin "%opt{blue}+i"
|
||||
set-face global ts_function_macro "%opt{mauve}"
|
||||
set-face global ts_hint "%opt{blue}+b"
|
||||
set-face global ts_info "%opt{green}+b"
|
||||
set-face global ts_keyword "%opt{mauve}"
|
||||
set-face global ts_keyword_conditional "%opt{mauve}+i"
|
||||
set-face global ts_keyword_control_conditional "%opt{mauve}+i"
|
||||
set-face global ts_keyword_control_directive "%opt{mauve}+i"
|
||||
set-face global ts_keyword_control_import "%opt{mauve}+i"
|
||||
set-face global ts_keyword_directive "%opt{mauve}+i"
|
||||
set-face global ts_label "%opt{cyan}+i"
|
||||
set-face global ts_markup_bold "%opt{orange}+b"
|
||||
set-face global ts_markup_heading "%opt{red}"
|
||||
set-face global ts_markup_heading_1 "%opt{red}"
|
||||
set-face global ts_markup_heading_2 "%opt{mauve}"
|
||||
set-face global ts_markup_heading_3 "%opt{green}"
|
||||
set-face global ts_markup_heading_4 "%opt{yellow}"
|
||||
set-face global ts_markup_heading_5 "%opt{pink}"
|
||||
set-face global ts_markup_heading_6 "%opt{teal}"
|
||||
set-face global ts_markup_heading_marker "%opt{orange}+b"
|
||||
set-face global ts_markup_italic "%opt{pink}+i"
|
||||
set-face global ts_markup_list_checked "%opt{green}"
|
||||
set-face global ts_markup_list_numbered "%opt{blue}+i"
|
||||
set-face global ts_markup_list_unchecked "%opt{teal}"
|
||||
set-face global ts_markup_list_unnumbered "%opt{mauve}"
|
||||
set-face global ts_markup_link_label "%opt{blue}"
|
||||
set-face global ts_markup_link_url "%opt{teal}+u"
|
||||
set-face global ts_markup_link_uri "%opt{teal}+u"
|
||||
set-face global ts_markup_link_text "%opt{blue}"
|
||||
set-face global ts_markup_quote "%opt{gray1}"
|
||||
set-face global ts_markup_raw "%opt{green}"
|
||||
set-face global ts_markup_strikethrough "%opt{gray1}+s"
|
||||
set-face global ts_namespace "%opt{blue}+i"
|
||||
set-face global ts_operator "%opt{sky}"
|
||||
set-face global ts_property "%opt{sky}"
|
||||
set-face global ts_punctuation "%opt{overlay1}"
|
||||
set-face global ts_punctuation_special "%opt{sky}"
|
||||
set-face global ts_special "%opt{blue}"
|
||||
set-face global ts_spell "%opt{mauve}"
|
||||
set-face global ts_string "%opt{green}"
|
||||
set-face global ts_string_regex "%opt{orange}"
|
||||
set-face global ts_string_regexp "%opt{orange}"
|
||||
set-face global ts_string_escape "%opt{mauve}"
|
||||
set-face global ts_string_special "%opt{blue}"
|
||||
set-face global ts_string_special_path "%opt{green}"
|
||||
set-face global ts_string_special_symbol "%opt{mauve}"
|
||||
set-face global ts_string_symbol "%opt{red}"
|
||||
set-face global ts_tag "%opt{mauve}"
|
||||
set-face global ts_tag_error "%opt{red}"
|
||||
set-face global ts_text "%opt{white}"
|
||||
set-face global ts_text_title "%opt{mauve}"
|
||||
set-face global ts_type "%opt{yellow}"
|
||||
set-face global ts_type_enum_variant "%opt{flamingo}"
|
||||
set-face global ts_variable "%opt{white}"
|
||||
set-face global ts_variable_builtin "%opt{red}"
|
||||
set-face global ts_variable_other_member "%opt{teal}"
|
||||
set-face global ts_variable_parameter "%opt{maroon}+i"
|
||||
set-face global ts_warning "%opt{orange}+b"
|
||||
166
config/.config/kak/colors/catppuccin_mocha.kak
Normal file
166
config/.config/kak/colors/catppuccin_mocha.kak
Normal file
@@ -0,0 +1,166 @@
|
||||
# Catppuccint Mocha theme for Kakoune
|
||||
#
|
||||
# Taken and adapted from
|
||||
# <https://github.com/catppuccin/kakoune/blob/7f187d9da2867a7fda568b2135d29b9c00cfbb94/colors/catppuccin_mocha.kak>
|
||||
|
||||
# Catppuccin theme for Kakoune
|
||||
|
||||
# Color palette (see https://catppuccin.com/palette)
|
||||
declare-option str rosewater "rgb:f5e0dc"
|
||||
declare-option str flamingo "rgb:f2cdcd"
|
||||
declare-option str pink "rgb:f5c2e7"
|
||||
declare-option str mauve "rgb:cba6f7"
|
||||
declare-option str red "rgb:f38ba8"
|
||||
declare-option str maroon "rgb:eba0ac"
|
||||
declare-option str peach "rgb:fab387"
|
||||
declare-option str yellow "rgb:f9e2af"
|
||||
declare-option str green "rgb:a6e3a1"
|
||||
declare-option str teal "rgb:94e2d5"
|
||||
declare-option str sky "rgb:89dceb"
|
||||
declare-option str sapphire "rgb:74c7ec"
|
||||
declare-option str blue "rgb:89b4fa"
|
||||
declare-option str lavender "rgb:b4befe"
|
||||
declare-option str text "rgb:cdd6f4"
|
||||
declare-option str subtext1 "rgb:bac2de"
|
||||
declare-option str subtext0 "rgb:a6adc8"
|
||||
declare-option str overlay2 "rgb:9399b2"
|
||||
declare-option str overlay1 "rgb:7f849c"
|
||||
declare-option str overlay0 "rgb:6c7086"
|
||||
declare-option str surface2 "rgb:585b70"
|
||||
declare-option str surface1 "rgb:45475a"
|
||||
declare-option str surface0 "rgb:313244"
|
||||
declare-option str base "rgb:1e1e2e"
|
||||
declare-option str mantle "rgb:181825"
|
||||
declare-option str crust "rgb:11111b"
|
||||
|
||||
# Markup
|
||||
set-face global title "%opt{text}+b"
|
||||
set-face global header "%opt{subtext0}+b"
|
||||
set-face global bold "%opt{maroon}+b"
|
||||
set-face global italic "%opt{maroon}+i"
|
||||
set-face global mono "%opt{green}"
|
||||
set-face global block "%opt{sapphire}"
|
||||
set-face global link "%opt{blue}"
|
||||
set-face global bullet "%opt{peach}"
|
||||
set-face global list "%opt{peach}"
|
||||
|
||||
# Builtins
|
||||
set-face global Default "%opt{text},%opt{base}"
|
||||
set-face global PrimarySelection "%opt{text},%opt{surface2}"
|
||||
set-face global SecondarySelection "%opt{text},%opt{surface2}"
|
||||
set-face global PrimaryCursor "%opt{crust},%opt{rosewater}"
|
||||
set-face global SecondaryCursor "%opt{text},%opt{overlay0}"
|
||||
set-face global PrimaryCursorEol "%opt{surface2},%opt{lavender}"
|
||||
set-face global SecondaryCursorEol "%opt{surface2},%opt{overlay1}"
|
||||
set-face global LineNumbers "%opt{overlay1},%opt{base}"
|
||||
set-face global LineNumberCursor "%opt{rosewater},%opt{surface2}+b"
|
||||
set-face global LineNumbersWrapped "%opt{rosewater},%opt{surface2}"
|
||||
set-face global MenuForeground "%opt{text},%opt{surface1}+b"
|
||||
set-face global MenuBackground "%opt{text},%opt{surface0}"
|
||||
set-face global MenuInfo "%opt{crust},%opt{teal}"
|
||||
set-face global Information "%opt{crust},%opt{teal}"
|
||||
set-face global Error "%opt{crust},%opt{red}"
|
||||
set-face global DiagnosticError Error
|
||||
set-face global DiagnosticWarning "%opt{yellow}"
|
||||
set-face global StatusLine "%opt{text},%opt{mantle}"
|
||||
set-face global StatusLineMode "%opt{crust},%opt{yellow}"
|
||||
set-face global StatusLineInfo "%opt{crust},%opt{teal}"
|
||||
set-face global StatusLineValue "%opt{crust},%opt{yellow}"
|
||||
set-face global StatusCursor "%opt{crust},%opt{rosewater}"
|
||||
set-face global Prompt "%opt{teal},%opt{base}+b"
|
||||
set-face global MatchingChar "%opt{maroon},%opt{base}"
|
||||
set-face global Whitespace "%opt{overlay1},%opt{base}+f"
|
||||
set-face global WrapMarker Whitespace
|
||||
set-face global BufferPadding "%opt{base},%opt{base}"
|
||||
|
||||
|
||||
# Code
|
||||
set-face global value "%opt{peach}"
|
||||
set-face global type "%opt{yellow}"
|
||||
set-face global variable "%opt{text}"
|
||||
set-face global module "%opt{maroon}"
|
||||
set-face global function "%opt{blue}"
|
||||
set-face global string "%opt{green}"
|
||||
set-face global keyword "%opt{mauve}"
|
||||
set-face global operator "%opt{sky}"
|
||||
set-face global attribute "%opt{yellow}"
|
||||
set-face global comment "%opt{overlay1}+i"
|
||||
set-face global documentation comment
|
||||
set-face global meta "%opt{yellow}"
|
||||
set-face global builtin "%opt{red}"
|
||||
|
||||
# Tree-sitter (<https://git.sr.ht/~hadronized/kak-tree-sitter>)
|
||||
# Copied from catppuccin_macchiato.kak
|
||||
# Adjusted with https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md
|
||||
set-face global ts_attribute attribute
|
||||
set-face global ts_comment comment
|
||||
set-face global ts_conceal "%opt{mauve}+i"
|
||||
set-face global ts_constant "%opt{peach}"
|
||||
set-face global ts_constant_builtin_boolean "%opt{sky}"
|
||||
set-face global ts_constant_character "%opt{yellow}"
|
||||
set-face global ts_constant_macro "%opt{mauve}"
|
||||
set-face global ts_constructor "%opt{sky}"
|
||||
set-face global ts_diff_plus "%opt{green}"
|
||||
set-face global ts_diff_minus "%opt{red}"
|
||||
set-face global ts_diff_delta "%opt{blue}"
|
||||
set-face global ts_diff_delta_moved "%opt{mauve}"
|
||||
set-face global ts_error "%opt{red}+b"
|
||||
set-face global ts_function "%opt{blue}"
|
||||
set-face global ts_function_builtin "%opt{blue}+i"
|
||||
set-face global ts_function_macro "%opt{mauve}"
|
||||
set-face global ts_hint "%opt{blue}+b"
|
||||
set-face global ts_info "%opt{teal}+b"
|
||||
set-face global ts_keyword "%opt{mauve}"
|
||||
set-face global ts_keyword_conditional "%opt{mauve}+i"
|
||||
set-face global ts_keyword_control_conditional "%opt{mauve}+i"
|
||||
set-face global ts_keyword_control_directive "%opt{mauve}+i"
|
||||
set-face global ts_keyword_control_import "%opt{mauve}+i"
|
||||
set-face global ts_keyword_directive "%opt{mauve}+i"
|
||||
set-face global ts_label "%opt{sky}+i"
|
||||
set-face global ts_markup_bold "%opt{peach}+b"
|
||||
set-face global ts_markup_heading "%opt{red}"
|
||||
set-face global ts_markup_heading_1 "%opt{red}"
|
||||
set-face global ts_markup_heading_2 "%opt{mauve}"
|
||||
set-face global ts_markup_heading_3 "%opt{green}"
|
||||
set-face global ts_markup_heading_4 "%opt{yellow}"
|
||||
set-face global ts_markup_heading_5 "%opt{pink}"
|
||||
set-face global ts_markup_heading_6 "%opt{teal}"
|
||||
set-face global ts_markup_heading_marker "%opt{peach}+b"
|
||||
set-face global ts_markup_italic "%opt{pink}+i"
|
||||
set-face global ts_markup_list_checked "%opt{green}"
|
||||
set-face global ts_markup_list_numbered "%opt{blue}+i"
|
||||
set-face global ts_markup_list_unchecked "%opt{teal}"
|
||||
set-face global ts_markup_list_unnumbered "%opt{mauve}"
|
||||
set-face global ts_markup_link_label "%opt{blue}"
|
||||
set-face global ts_markup_link_url "%opt{teal}+u"
|
||||
set-face global ts_markup_link_uri "%opt{teal}+u"
|
||||
set-face global ts_markup_link_text "%opt{blue}"
|
||||
set-face global ts_markup_quote "%opt{overlay1}"
|
||||
set-face global ts_markup_raw "%opt{green}"
|
||||
set-face global ts_markup_strikethrough "%opt{overlay1}+s"
|
||||
set-face global ts_namespace "%opt{blue}+i"
|
||||
set-face global ts_operator "%opt{sky}"
|
||||
set-face global ts_property "%opt{sky}"
|
||||
set-face global ts_punctuation "%opt{overlay1}"
|
||||
set-face global ts_punctuation_special "%opt{sky}"
|
||||
set-face global ts_special "%opt{blue}"
|
||||
set-face global ts_spell "%opt{mauve}"
|
||||
set-face global ts_string string
|
||||
set-face global ts_string_regex "%opt{pink}"
|
||||
set-face global ts_string_regexp "%opt{pink}"
|
||||
set-face global ts_string_escape "%opt{flamingo}"
|
||||
set-face global ts_string_special "%opt{blue}"
|
||||
set-face global ts_string_special_path "%opt{green}"
|
||||
set-face global ts_string_special_symbol "%opt{mauve}"
|
||||
set-face global ts_string_symbol "%opt{red}"
|
||||
set-face global ts_tag "%opt{mauve}"
|
||||
set-face global ts_tag_error "%opt{red}"
|
||||
set-face global ts_text "%opt{text}"
|
||||
set-face global ts_text_title "%opt{mauve}"
|
||||
set-face global ts_type type
|
||||
set-face global ts_type_enum_variant "%opt{teal}"
|
||||
set-face global ts_variable variable
|
||||
set-face global ts_variable_builtin builtin
|
||||
set-face global ts_variable_other_member "%opt{teal}"
|
||||
set-face global ts_variable_parameter "%opt{maroon}+i"
|
||||
set-face global ts_warning "%opt{yellow}+b"
|
||||
1
config/.config/kak/colors/kakoune
Symbolic link
1
config/.config/kak/colors/kakoune
Symbolic link
@@ -0,0 +1 @@
|
||||
../plugins/base16-kakoune/colors/
|
||||
423
config/.config/kak/kakrc
Normal file
423
config/.config/kak/kakrc
Normal file
@@ -0,0 +1,423 @@
|
||||
### Plugins ###
|
||||
evaluate-commands %sh{
|
||||
plugins="$kak_config/plugins"
|
||||
mkdir -p "$plugins"
|
||||
[ ! -e "$plugins/plug.kak" ] && \
|
||||
git clone -q https://github.com/andreyorst/plug.kak.git "$plugins/plug.kak"
|
||||
printf "%s\n" "source '$plugins/plug.kak/rc/plug.kak'"
|
||||
}
|
||||
|
||||
plug "andreyorst/plug.kak" noload
|
||||
|
||||
plug "andreyorst/smarttab.kak" defer smarttab %{
|
||||
set-option global softtabstop 4
|
||||
}
|
||||
|
||||
plug "occivink/kakoune-sudo-write"
|
||||
|
||||
plug "kak-lsp/kak-lsp" do %{
|
||||
cargo install --locked --force --path .
|
||||
}
|
||||
|
||||
# plug "gustavo-hms/luar" %{
|
||||
# plug "gustavo-hms/peneira" %{
|
||||
# require-module peneira
|
||||
# }
|
||||
# }
|
||||
|
||||
# # Color Themes
|
||||
plug "tinted-theming/base16-kakoune"
|
||||
|
||||
### End Of Plugins ###
|
||||
|
||||
# set-option global luar_interpreter luajit
|
||||
|
||||
## Treesitter ##
|
||||
|
||||
eval %sh{ kak-tree-sitter -dks --with-highlighting --with-text-objects --session $kak_session }
|
||||
#eval %sh{ kak-tree-sitter -dks --with-text-objects --session $kak_session }
|
||||
#eval %sh{ kak-tree-sitter -dks --with-highlighting --session $kak_session }
|
||||
|
||||
evaluate-commands %sh{
|
||||
echo "colorscheme base16-$BASE16_THEME"
|
||||
}
|
||||
|
||||
## Highlighting ##
|
||||
hook global WinCreate .* %{ add-highlighter window/number-lines number-lines -relative -hlcursor}
|
||||
add-highlighter global/ show-matching
|
||||
add-highlighter global/ column 80 MenuForeground
|
||||
add-highlighter global/ show-whitespaces
|
||||
|
||||
## Formatting ##
|
||||
define-command enable-autofmt -docstring 'enable autoformatting of buffer' %{
|
||||
|
||||
|
||||
hook global -group autofmt BufSetOption filetype=(zig) %{
|
||||
set-option buffer formatcmd 'zig fmt --stdin'
|
||||
|
||||
hook -group autofmt buffer BufOpenFile .* %{
|
||||
format
|
||||
}
|
||||
|
||||
hook -group autofmt buffer BufWritePre .* %{
|
||||
format
|
||||
}
|
||||
}
|
||||
|
||||
hook global -group autofmt BufSetOption filetype=(html) %{
|
||||
set-option buffer formatcmd 'prettier --tab-width 4 --parser html'
|
||||
|
||||
hook -group autofmt buffer BufOpenFile .* %{
|
||||
format
|
||||
}
|
||||
|
||||
hook -group autofmt buffer BufWritePre .* %{
|
||||
format
|
||||
}
|
||||
}
|
||||
|
||||
hook global -group autofmt BufSetOption filetype=(css) %{
|
||||
set-option buffer formatcmd 'prettier --tab-width 4 --parser css'
|
||||
|
||||
hook -group autofmt buffer BufOpenFile .* %{
|
||||
format
|
||||
}
|
||||
|
||||
hook -group autofmt buffer BufWritePre .* %{
|
||||
format
|
||||
}
|
||||
}
|
||||
|
||||
hook global -group autofmt BufSetOption filetype=(javascript) %{
|
||||
set-option buffer formatcmd 'prettier --tab-width 4 --parser typescript'
|
||||
|
||||
hook -group autofmt buffer BufOpenFile .* %{
|
||||
format
|
||||
}
|
||||
|
||||
hook -group autofmt buffer BufWritePre .* %{
|
||||
format
|
||||
}
|
||||
}
|
||||
|
||||
hook global -group autofmt BufSetOption filetype=(go) %{
|
||||
set-option buffer formatcmd 'gofmt'
|
||||
|
||||
hook -group autofmt buffer BufOpenFile .* %{
|
||||
format
|
||||
}
|
||||
|
||||
hook -group autofmt buffer BufWritePre .* %{
|
||||
format
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
define-command disable-autofmt -docstring 'disable autoformatting of buffer' %{
|
||||
remove-hooks global autofmt
|
||||
}
|
||||
|
||||
enable-autofmt
|
||||
|
||||
|
||||
## Indentation ##
|
||||
set global tabstop 4
|
||||
set global indentwidth 4
|
||||
hook global WinSetOption filetype=.* expandtab
|
||||
hook global WinSetOption filetype=(makefile|gas) noexpandtab
|
||||
hook global BufCreate .* %{
|
||||
editorconfig-load
|
||||
autoconfigtab
|
||||
}
|
||||
|
||||
define-command sleuth -docstring 'Heuristically set buffer options' %{
|
||||
try %{
|
||||
evaluate-commands -draft %{
|
||||
# Search the first indent level
|
||||
execute-keys 'gg' '/' '^\h+' '<ret>'
|
||||
|
||||
# Tab vs. Space
|
||||
# https://youtu.be/V7PLxL8jIl8
|
||||
try %{
|
||||
execute-keys '<a-k>' '\t' '<ret>'
|
||||
#set-option buffer indentwidth 0
|
||||
noexpandtab
|
||||
} catch %{
|
||||
set-option buffer indentwidth %val{selection_length}
|
||||
expandtab
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
define-command git-status -docstring 'Show git diff' %{
|
||||
hook -group git-status global BufOpenFile .* %{
|
||||
git show-diff
|
||||
}
|
||||
|
||||
hook -group git-status global BufWritePost .* %{
|
||||
git show-diff
|
||||
}
|
||||
}
|
||||
|
||||
define-command disable-git-status -docstring 'Disable git diff gutter' %{
|
||||
remove-hooks global git-status
|
||||
}
|
||||
|
||||
define-command sleuth-enable -docstring 'Enable sleuth' %{
|
||||
# Run sleuth when opening and saving files.
|
||||
hook -group sleuth global BufOpenFile .* %{
|
||||
sleuth
|
||||
}
|
||||
|
||||
hook -group sleuth global BufWritePost .* %{
|
||||
sleuth
|
||||
}
|
||||
}
|
||||
|
||||
define-command sleuth-disable -docstring 'Disable sleuth' %{
|
||||
remove-hooks global sleuth
|
||||
}
|
||||
|
||||
## LSP ##
|
||||
lsp-enable
|
||||
lsp-auto-hover-enable
|
||||
|
||||
lsp-inlay-diagnostics-enable global
|
||||
hook global WinSetOption filetype=(c|zig|rust|python|ruby|lua|java|html|css) %{
|
||||
hook window -group semantic-tokens BufReload .* lsp-semantic-tokens
|
||||
hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens
|
||||
hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens
|
||||
hook -once -always window WinSetOption filetype=.* %{
|
||||
remove-hooks window semantic-tokens
|
||||
}
|
||||
}
|
||||
|
||||
face global InfoDefault Information
|
||||
face global InfoBlock Information
|
||||
face global InfoBlockQuote Information
|
||||
face global InfoBullet Information
|
||||
face global InfoHeader Information
|
||||
face global InfoLink Information
|
||||
face global InfoLinkMono Information
|
||||
face global InfoMono Information
|
||||
face global InfoRule Information
|
||||
face global InfoDiagnosticError Information
|
||||
face global InfoDiagnosticHint Information
|
||||
face global InfoDiagnosticInformation Information
|
||||
face global InfoDiagnosticWarning Information
|
||||
|
||||
set-option global lsp_config %{
|
||||
}
|
||||
|
||||
define-command -docstring 'Invoke fzf to select a buffer' fzf-buffer %{
|
||||
evaluate-commands %sh{
|
||||
BUFFER=$(
|
||||
(
|
||||
eval "set -- $kak_buflist"
|
||||
while [ $# -gt 0 ]; do
|
||||
printf "%s\0" "$1"
|
||||
shift
|
||||
done
|
||||
) |
|
||||
fzf-tmux --cycle -p 80%,90% --read0 --preview='bat --theme=base16-256 --color=always {} 2>/dev/null'
|
||||
)
|
||||
BUFFER=${BUFFER/\'/\'\'}
|
||||
if [ -n "$BUFFER" ]; then
|
||||
printf "buffer %s" "${BUFFER}"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
define-command -docstring 'live grep' live-grep %{
|
||||
evaluate-commands %sh{
|
||||
|
||||
if [ -z "${kak_client_env_TMUX}" ]; then
|
||||
printf 'fail "client was not started under tmux"\n'
|
||||
else
|
||||
file="$(rfv.sh)"
|
||||
if [ -n "$file" ]; then
|
||||
printf "edit %s\n" "$file"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
define-command -docstring 'exact grep' exact-grep %{
|
||||
evaluate-commands %sh{
|
||||
|
||||
if [ -z "${kak_client_env_TMUX}" ]; then
|
||||
printf 'fail "client was not started under tmux"\n'
|
||||
else
|
||||
file="$(rfve.sh)"
|
||||
if [ -n "$file" ]; then
|
||||
printf "edit %s\n" "$file"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
define-command -docstring 'search contents of current file' file-search %{
|
||||
evaluate-commands -save-regs '"' %{
|
||||
set-register dquote %sh{ mktemp }
|
||||
execute-keys -draft '%<a-|> cat > $kak_reg_dquote<ret>'
|
||||
evaluate-commands %sh{
|
||||
if [ -z "${kak_client_env_TMUX}" ]; then
|
||||
printf 'fail "client was not started under tmux"\n'
|
||||
else
|
||||
file="$(rfs.sh ${kak_reg_dquote} ${kak_buffile})"
|
||||
if [ -n "$file" ]; then
|
||||
printf "edit %s\n" "$file"
|
||||
fi
|
||||
rm $kak_reg_dquote
|
||||
fi
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
define-command -docstring 'search contents of current file with regex' regex-file-search %{
|
||||
evaluate-commands -save-regs '"' %{
|
||||
set-register dquote %sh{ mktemp }
|
||||
execute-keys -draft '%<a-|> cat > $kak_reg_dquote<ret>'
|
||||
evaluate-commands %sh{
|
||||
if [ -z "${kak_client_env_TMUX}" ]; then
|
||||
printf 'fail "client was not started under tmux"\n'
|
||||
else
|
||||
file="$(rgrs.sh ${kak_reg_dquote} ${kak_buffile})"
|
||||
if [ -n "$file" ]; then
|
||||
printf "edit %s\n" "$file"
|
||||
fi
|
||||
rm $kak_reg_dquote
|
||||
fi
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
define-command -docstring 'Invoke fzf to open a file' -params 0 fzf-edit %{
|
||||
evaluate-commands %sh{
|
||||
if [ -z "${kak_client_env_TMUX}" ]; then
|
||||
printf 'fail "client was not started under tmux"\n'
|
||||
else
|
||||
file="$(fd -t f . |TMUX="${kak_client_env_TMUX}" fzf-tmux --cycle -p 80%,90% --preview='bat --theme=base16-256 --color=always {} 2>/dev/null || cat {} 2>/dev/null')"
|
||||
if [ -n "$file" ]; then
|
||||
printf "edit %s\n" "$file"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
define-command -docstring 'Invoke fzf to open a file local to the current file' -params 0 fzf-edit-local %{
|
||||
evaluate-commands %sh{
|
||||
if [ -z "${kak_client_env_TMUX}" ]; then
|
||||
printf 'fail "client was not started under tmux"\n'
|
||||
else
|
||||
dir="$(get_local_path ${kak_buffile})"
|
||||
if [ -n "$dir" ]; then
|
||||
file="$(fd -u -t f . $dir |TMUX="${kak_client_env_TMUX}" fzf-tmux --cycle -p 80%,90% --preview='bat --theme=base16-256 --color=always {} 2>/dev/null || cat {} 2>/dev/null')"
|
||||
fi
|
||||
if [ -n "$file" ]; then
|
||||
printf "edit %s\n" "$file"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
define-command -docstring 'Pick project' -params 0 switch-project %{
|
||||
evaluate-commands %sh{
|
||||
if [ -z "${kak_client_env_TMUX}" ]; then
|
||||
printf 'fail "client was not started under tmux"\n'
|
||||
else
|
||||
proj="$(cat ~/.scripts/projects | TMUX="${kak_client_env_TMUX}" fzf-tmux --cycle -p 80%,90% | cut -d' ' -f1)"
|
||||
if [ -n "$proj" ]; then
|
||||
printf "cd %s\n" "$proj"
|
||||
printf 'fzf-edit\n'
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
define-command -docstring 'Project wide search' project-search %{
|
||||
evaluate-commands %sh{
|
||||
|
||||
if [ -z "${kak_client_env_TMUX}" ]; then
|
||||
printf 'fail "client was not started under tmux"\n'
|
||||
else
|
||||
file="$(rgfs.sh)"
|
||||
if [ -n "$file" ]; then
|
||||
printf "edit %s\n" "$file"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
define-command -docstring 'Print Working Directory' -params 0 pwd %{
|
||||
evaluate-commands echo %sh{ echo "$(pwd)"}
|
||||
}
|
||||
|
||||
define-command -docstring 'copy to clipboard' xcopy %{
|
||||
execute-keys '<a-|>xclip -selection clipboard -i<ret>'
|
||||
}
|
||||
|
||||
define-command -docstring 'paste from clipboard' xpaste %{
|
||||
evaluate-commands -save-regs '"' %{
|
||||
set-register dquote %sh{ xclip -selection clipboard -o }
|
||||
execute-keys 'p'
|
||||
}
|
||||
}
|
||||
|
||||
declare-user-mode config
|
||||
map -docstring 'enter config mode' global user e ':enter-user-mode config<ret>'
|
||||
map -docstring 'edit kakoune config' global config k ':cd ~/.config/kak/<ret>:e ./kakrc<ret>'
|
||||
map -docstring 'edit tmux config' global config t ':e ~/.tmux.conf<ret>'
|
||||
map -docstring 'edit bash config' global config b ':e ~/.bashrc<ret>'
|
||||
map -docstring 'edit scripts folder' global config s ':cd ~/.scripts<ret>:fzf-edit<ret>'
|
||||
map -docstring 'edit .config folder' global config c ':cd ~/.config<ret>:fzf-edit<ret>'
|
||||
|
||||
declare-user-mode buffer
|
||||
map -docstring 'enter buffer mode' global user b ':enter-user-mode buffer<ret>'
|
||||
map -docstring 'next buffer' global buffer n ':buffer-next<ret>'
|
||||
map -docstring 'previous buffer' global buffer p ':buffer-previous<ret>'
|
||||
map -docstring 'close current buffer' global buffer d ':delete-buffer!<ret>'
|
||||
map -docstring 'write and close current buffer' global buffer w ':w<ret>:db<ret>'
|
||||
map -docstring 'list and select a buffer' global buffer b ':fzf-buffer<ret>'
|
||||
|
||||
declare-user-mode find
|
||||
map -docstring 'enter find mode' global user f ':enter-user-mode find<ret>'
|
||||
map -docstring 'find files' global find f ':fzf-edit<ret>'
|
||||
map -docstring 'find tags for the current project' global find t ':ctags-search '
|
||||
map -docstring 'find line in current file' global find l ':file-search<ret>'
|
||||
map -docstring 'find line in current file with regex' global find L ':regex-file-search<ret>'
|
||||
map -docstring 'find files in current directory' global find F ':fzf-edit-local<ret>'
|
||||
map -docstring "grep file contents recursively" global find g ':live-grep<ret>'
|
||||
map -docstring "grep exact file contents recursively" global find e ':exact-grep<ret>'
|
||||
map -docstring 'project wide search' global find p ':project-search<ret>'
|
||||
|
||||
map -docstring 'enter lsp mode' global user l ':enter-user-mode lsp<ret>'
|
||||
map -docstring 'goto definition (tag)' global lsp t '<a-i>w:ctags-search<ret>'
|
||||
|
||||
map -docstring 'enter treesitter mode' global user t ':enter-user-mode tree-sitter<ret>'
|
||||
map -docstring 'enter treesitter search mode' global user s ':enter-user-mode tree-sitter-search<ret>'
|
||||
|
||||
declare-user-mode tmux
|
||||
map -docstring 'enter tmux/window mode' global user w ':enter-user-mode tmux<ret>'
|
||||
map -docstring 'vertical split' global tmux v ':tmux-terminal-horizontal kak -c %val{session}<ret>'
|
||||
map -docstring 'horizontal split' global tmux h ':tmux-terminal-vertical kak -c %val{session}<ret>'
|
||||
map -docstring 'new tab' global tmux t ':tmux-terminal-window kak -c %val{session}<ret>'
|
||||
map -docstring 'vertical terminal split' global tmux V ':tmux-repl-horizontal bash<ret>'
|
||||
map -docstring 'horizontal terminal split' global tmux H ':tmux-repl-vertical bash<ret>'
|
||||
map -docstring 'new terminal tab' global tmux T ':tmux-repl-window<ret>'
|
||||
map -docstring 'new git window' global tmux g ':tmux-terminal-window lazygit<ret>'
|
||||
|
||||
declare-user-mode project
|
||||
map -docstring 'enter project mode' global user P ':enter-user-mode project<ret>'
|
||||
map -docstring 'open project' global project o ':switch-project<ret>'
|
||||
|
||||
map -docstring 'enter man mode' global user m ':enter-user-mode man<ret>'
|
||||
|
||||
#map -docstring 'clipboard yank' global user y '<a-|>clip.exe<ret>'
|
||||
map -docstring 'clipboard yank' global user y ':xcopy<ret>'
|
||||
#map -docstring 'clipboard paste' global user p '|powershell.exe -C Get-Clipboard | tr -d "\r"<ret>'
|
||||
map -docstring 'clipboard paste' global user p ':xpaste<ret>'
|
||||
|
||||
map -docstring 'quit kakoune' global user q ':q<ret>'
|
||||
map -docstring 'toggle comments' global user c ':comment-line<ret>'
|
||||
4
config/.config/kak/plugins/.build/kak-lsp/hooks
Normal file
4
config/.config/kak/plugins/.build/kak-lsp/hooks
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
set -e
|
||||
|
||||
cargo install --locked --force --path .
|
||||
19
config/.config/kak/plugins/.build/kakoune-discord/config
Normal file
19
config/.config/kak/plugins/.build/kakoune-discord/config
Normal file
@@ -0,0 +1,19 @@
|
||||
try %{
|
||||
|
||||
discord-presence-enable
|
||||
} catch %{
|
||||
echo -debug "Error while evaluating 'kakoune-discord' configuration: %val{error}"
|
||||
|
||||
set-option -add current plug_conf_errors "Error while evaluating 'kakoune-discord' configuration:"
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n " }
|
||||
set-option -add current plug_conf_errors %val{error}
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n\n" }
|
||||
|
||||
hook -once -group plug-conf-err global WinDisplay .* %{
|
||||
info -style modal -title "plug.kak error" "%opt{plug_conf_errors}"
|
||||
on-key %{
|
||||
info -style modal
|
||||
execute-keys -with-maps -with-hooks %val{key}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
config/.config/kak/plugins/.build/kakoune-discord/hooks
Normal file
2
config/.config/kak/plugins/.build/kakoune-discord/hooks
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
cargo install --path . --force
|
||||
23
config/.config/kak/plugins/.build/kakoune-rainbow/config
Normal file
23
config/.config/kak/plugins/.build/kakoune-rainbow/config
Normal file
@@ -0,0 +1,23 @@
|
||||
try %{
|
||||
|
||||
require-module rainbow
|
||||
# suggested mapping
|
||||
# # map global user r ": rainbow<ret>" -docstring "rainbow brackets"
|
||||
# # map global user R ": rmhl window/ranges_rainbow_specs<ret>" \
|
||||
# # -docstring "remove rainbow highlighter"
|
||||
} catch %{
|
||||
echo -debug "Error while evaluating 'kakoune-rainbow' configuration: %val{error}"
|
||||
|
||||
set-option -add current plug_conf_errors "Error while evaluating 'kakoune-rainbow' configuration:"
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n " }
|
||||
set-option -add current plug_conf_errors %val{error}
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n\n" }
|
||||
|
||||
hook -once -group plug-conf-err global WinDisplay .* %{
|
||||
info -style modal -title "plug.kak error" "%opt{plug_conf_errors}"
|
||||
on-key %{
|
||||
info -style modal
|
||||
execute-keys -with-maps -with-hooks %val{key}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
config/.config/kak/plugins/.build/kakoune-rainbow/domain
Normal file
1
config/.config/kak/plugins/.build/kakoune-rainbow/domain
Normal file
@@ -0,0 +1 @@
|
||||
gitlab.com
|
||||
@@ -0,0 +1,19 @@
|
||||
try %{
|
||||
|
||||
# configuration here
|
||||
} catch %{
|
||||
echo -debug "Error while evaluating 'kakoune-smooth-scroll' configuration: %val{error}"
|
||||
|
||||
set-option -add current plug_conf_errors "Error while evaluating 'kakoune-smooth-scroll' configuration:"
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n " }
|
||||
set-option -add current plug_conf_errors %val{error}
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n\n" }
|
||||
|
||||
hook -once -group plug-conf-err global WinDisplay .* %{
|
||||
info -style modal -title "plug.kak error" "%opt{plug_conf_errors}"
|
||||
on-key %{
|
||||
info -style modal
|
||||
execute-keys -with-maps -with-hooks %val{key}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
config/.config/kak/plugins/.build/luar/config
Normal file
21
config/.config/kak/plugins/.build/luar/config
Normal file
@@ -0,0 +1,21 @@
|
||||
try %{
|
||||
|
||||
plug "gustavo-hms/peneira" %{
|
||||
require-module peneira
|
||||
}
|
||||
} catch %{
|
||||
echo -debug "Error while evaluating 'luar' configuration: %val{error}"
|
||||
|
||||
set-option -add current plug_conf_errors "Error while evaluating 'luar' configuration:"
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n " }
|
||||
set-option -add current plug_conf_errors %val{error}
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n\n" }
|
||||
|
||||
hook -once -group plug-conf-err global WinDisplay .* %{
|
||||
info -style modal -title "plug.kak error" "%opt{plug_conf_errors}"
|
||||
on-key %{
|
||||
info -style modal
|
||||
execute-keys -with-maps -with-hooks %val{key}
|
||||
}
|
||||
}
|
||||
}
|
||||
19
config/.config/kak/plugins/.build/pandoc.kak/config
Normal file
19
config/.config/kak/plugins/.build/pandoc.kak/config
Normal file
@@ -0,0 +1,19 @@
|
||||
try %{
|
||||
|
||||
# your config
|
||||
} catch %{
|
||||
echo -debug "Error while evaluating 'pandoc.kak' configuration: %val{error}"
|
||||
|
||||
set-option -add current plug_conf_errors "Error while evaluating 'pandoc.kak' configuration:"
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n " }
|
||||
set-option -add current plug_conf_errors %val{error}
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n\n" }
|
||||
|
||||
hook -once -group plug-conf-err global WinDisplay .* %{
|
||||
info -style modal -title "plug.kak error" "%opt{plug_conf_errors}"
|
||||
on-key %{
|
||||
info -style modal
|
||||
execute-keys -with-maps -with-hooks %val{key}
|
||||
}
|
||||
}
|
||||
}
|
||||
19
config/.config/kak/plugins/.build/peneira/config
Normal file
19
config/.config/kak/plugins/.build/peneira/config
Normal file
@@ -0,0 +1,19 @@
|
||||
try %{
|
||||
|
||||
require-module peneira
|
||||
} catch %{
|
||||
echo -debug "Error while evaluating 'peneira' configuration: %val{error}"
|
||||
|
||||
set-option -add current plug_conf_errors "Error while evaluating 'peneira' configuration:"
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n " }
|
||||
set-option -add current plug_conf_errors %val{error}
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n\n" }
|
||||
|
||||
hook -once -group plug-conf-err global WinDisplay .* %{
|
||||
info -style modal -title "plug.kak error" "%opt{plug_conf_errors}"
|
||||
on-key %{
|
||||
info -style modal
|
||||
execute-keys -with-maps -with-hooks %val{key}
|
||||
}
|
||||
}
|
||||
}
|
||||
25
config/.config/kak/plugins/.build/tagbar.kak/config
Normal file
25
config/.config/kak/plugins/.build/tagbar.kak/config
Normal file
@@ -0,0 +1,25 @@
|
||||
try %{
|
||||
|
||||
# if you have wrap highlighter enamled in you configuration
|
||||
# files it's better to turn it off for tagbar, using this hook:
|
||||
hook global WinSetOption filetype=tagbar %{
|
||||
remove-highlighter window/wrap
|
||||
# you can also disable rendering whitespaces here, line numbers, and
|
||||
# matching characters
|
||||
}
|
||||
} catch %{
|
||||
echo -debug "Error while evaluating 'tagbar.kak' configuration: %val{error}"
|
||||
|
||||
set-option -add current plug_conf_errors "Error while evaluating 'tagbar.kak' configuration:"
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n " }
|
||||
set-option -add current plug_conf_errors %val{error}
|
||||
set-option -add current plug_conf_errors %sh{ printf "\n\n" }
|
||||
|
||||
hook -once -group plug-conf-err global WinDisplay .* %{
|
||||
info -style modal -title "plug.kak error" "%opt{plug_conf_errors}"
|
||||
on-key %{
|
||||
info -style modal
|
||||
execute-keys -with-maps -with-hooks %val{key}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user