diff --git a/kakoune/.config/kak/kakrc b/kakoune/.config/kak/kakrc new file mode 100644 index 0000000..8251017 --- /dev/null +++ b/kakoune/.config/kak/kakrc @@ -0,0 +1,106 @@ +# OPTIONS + +set-option global startup_info_version 20260412 +set-option global ui_options terminal_assistant=none + +add-highlighter global/ number-lines -relative + +# LOCAL + +nop %sh{ + mkdir -p "$kak_config/autoload" + ln -s "$kak_runtime/autoload" "$kak_config/autoload/stdlib" +} + +try %{ declare-user-mode file-mode } + +map global -docstring "File" user 'f' ': enter-user-mode file-mode' + +map global -docstring "Open (git)" file-mode 'a' ': file-open-git' +map global -docstring "Open (fd)" file-mode 'f' ': file-open' + +define-command -override file-open %{ + prompt -menu -shell-script-candidates %{ fd -t f } 'File: ' %{ edit -- %val{text} } +} + +define-command -override file-open-git %{ + prompt -menu -shell-script-candidates %{ git ls-files } 'File (git): ' %{ edit -- %val{text} } +} + +# ODIN + +hook global BufSetOption filetype=odin %{ + set-option buffer formatcmd 'odinfmt -stdin' +} + +# LSP + +eval %sh{kak-lsp} +lsp-enable + +set-option global modelinefmt "%opt{lsp_modeline} %opt{modelinefmt}" + +map global user l ': enter-user-mode lsp' -docstring 'LSP mode' + +map global goto d :lsp-definition -docstring 'LSP definition' +map global goto r :lsp-references -docstring 'LSP references' +map global goto y :lsp-type-definition -docstring 'LSP type definition' + +map global insert ':try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks tab> }' -docstring 'Select next snippet placeholder' + +map global object a 'lsp-object' -docstring 'LSP any symbol' +map global object 'lsp-object' -docstring 'LSP any symbol' +map global object f 'lsp-object Function Method' -docstring 'LSP function or method' +map global object t 'lsp-object Class Interface Module Namespace Struct' -docstring 'LSP class or module' +map global object d 'lsp-diagnostic-object error warning' -docstring 'LSP errors and warnings' +map global object D 'lsp-diagnostic-object error' -docstring 'LSP errors' + +# PLUG + +source "%val{config}/plugins/plug.kak/rc/plug.kak" +plug "andreyorst/plug.kak" noload + +# COLORSCHEME + +plug "https://codeberg.org/raiguard/kak-one" theme config %{ + colorscheme 'one-darker' +} + +# FZF + +plug "andreyorst/fzf.kak" config %{ + map global normal ': fzf-mode' +} + +hook global BufCreate [^*].* %{ + nop %sh{ + mru=~/.cache/kak-mru + echo "$kak_buffile" | awk '!seen[$0]++' - "$mru" | sponge "$mru" +}} + +# SURROUND + +plug "h-youhei/kakoune-surround" config %{ + declare-user-mode surround + map global surround s ': surround' -docstring 'surround' + map global surround c ': change-surround' -docstring 'change' + map global surround d ': delete-surround' -docstring 'delete' + map global surround t ': select-surrounding-tag' -docstring 'select tag' + map global -docstring 'Surround' user 'S' ': enter-user-mode surround' +} + +# HARPOON + +plug "https://codeberg.org/raiguard/kak-harpoon" config %{ + harpoon-add-bindings +} + +# EASYMOTION + +plug https://git.sr.ht/~voroskoi/easymotion.kak config %{ + require-module easymotion + map global -docstring 'easy j' user ': easymotion-j' + map global -docstring 'easy k' user ': easymotion-k' + map global -docstring 'easy w' user ': easymotion-w' + map global -docstring 'easy b'user ': easymotion-b' +} diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf index 8240fdd..f1773aa 100644 --- a/kitty/.config/kitty/kitty.conf +++ b/kitty/.config/kitty/kitty.conf @@ -17,6 +17,8 @@ open_url_with qutebrowser action_alias launch_tab_home launch --type tab --cwd=~ kitten_alias hints hints --hints-background-color red --hints-foreground-color white +allow_remote_control yes + map ctrl+shift+6 no_op map ctrl+shift+0 nth_window -1 diff --git a/shell/.config/shellconfig/aliases.sh b/shell/.config/shellconfig/aliases.sh index 37b2723..dc5c321 100644 --- a/shell/.config/shellconfig/aliases.sh +++ b/shell/.config/shellconfig/aliases.sh @@ -1,4 +1,5 @@ alias v=nvim +alias k=kak alias ll='ls -l' alias tl='tmux list-sessions' alias rgh='rg -.'