fix nix formatting

This commit is contained in:
Leonardo Eugênio 2023-01-22 19:41:28 -03:00
parent 273cd93ea3
commit 9dca602bd1
2 changed files with 5 additions and 1 deletions

View file

@ -11,6 +11,10 @@ hook global WinSetOption filetype=c %{
set buffer formatcmd 'clang-format' set buffer formatcmd 'clang-format'
} }
hook global WinSetOption filetype=nix %{
set buffer formatcmd 'nixpkgs-fmt'
}
hook global BufCreate .*\.rs %{ hook global BufCreate .*\.rs %{
set buffer formatcmd 'rustfmt' set buffer formatcmd 'rustfmt'
} }

View file

@ -10,7 +10,7 @@ map global user 'z' ':zoxide ' -docstring 'zoxide'
map global user 'n' ': new<ret>' -docstring 'new window' map global user 'n' ': new<ret>' -docstring 'new window'
map global user 'e' 'x|emmet<ret>@' -docstring 'process line with emmet' map global user 'e' 'x|emmet<ret>@' -docstring 'process line with emmet'
map global user 'm' ': try lsp-formatting-sync catch format-buffer<ret>' -docstring 'format document' map global user 'm' ': try format-buffer catch lsp-formatting-sync<ret>' -docstring 'format document'
map global user 'M' ': try lsp-range-formatting-sync catch format-selections<ret>' -docstring 'format selection' map global user 'M' ': try lsp-range-formatting-sync catch format-selections<ret>' -docstring 'format selection'
map global user 'c' ': comment-line<ret>' -docstring 'comment line' map global user 'c' ': comment-line<ret>' -docstring 'comment line'