diff --git a/user/kak/filetypes.kak b/user/kak/filetypes.kak index 0a2e478..765c14f 100644 --- a/user/kak/filetypes.kak +++ b/user/kak/filetypes.kak @@ -11,6 +11,10 @@ hook global WinSetOption filetype=c %{ set buffer formatcmd 'clang-format' } +hook global WinSetOption filetype=nix %{ + set buffer formatcmd 'nixpkgs-fmt' +} + hook global BufCreate .*\.rs %{ set buffer formatcmd 'rustfmt' } diff --git a/user/kak/usermode.kak b/user/kak/usermode.kak index 1e42712..cf3ae16 100644 --- a/user/kak/usermode.kak +++ b/user/kak/usermode.kak @@ -10,7 +10,7 @@ map global user 'z' ':zoxide ' -docstring 'zoxide' map global user 'n' ': new' -docstring 'new window' map global user 'e' 'x|emmet@' -docstring 'process line with emmet' -map global user 'm' ': try lsp-formatting-sync catch format-buffer' -docstring 'format document' +map global user 'm' ': try format-buffer catch lsp-formatting-sync' -docstring 'format document' map global user 'M' ': try lsp-range-formatting-sync catch format-selections' -docstring 'format selection' map global user 'c' ': comment-line' -docstring 'comment line'