diff options
author | tdro <tdro@users.noreply.github.com> | 2020-07-17 04:00:29 -0400 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2020-07-17 04:00:29 -0400 |
commit | 87583fe1f503bffe4327035e1191692740a9e427 (patch) | |
tree | 9d309d0532ace7df17a3b77b161668a22d9de410 /.vimrc | |
parent | 1908be48b67204601eabe46f80ce2cfb9ffdddd3 (diff) | |
download | dotfiles-87583fe1f503bffe4327035e1191692740a9e427.tar.gz dotfiles-87583fe1f503bffe4327035e1191692740a9e427.tar.bz2 dotfiles-87583fe1f503bffe4327035e1191692740a9e427.zip |
.vimrc: Add Nix formatter
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -131,6 +131,11 @@ function! ShellCheck() :silent !notify-send -t 10000 "$(shellcheck -x --exclude=SC1090,SC1091 % && echo 'Shellcheck OK: %')" >/dev/null 2>&1 & endfunction +" Nix Check +function! ShellCheck() + :silent !notify-send -t 10000 "$(nix-linter % 2>&1 && echo 'Nix Lint OK: %' && nixfmt %)" >/dev/null 2>&1 +endfunction + "---------------Shortcuts---------------" @@ -281,7 +286,7 @@ augroup AutoCommands autocmd BufWritePost *.js :call ESLintFix() autocmd BufWritePost *.yml :call AnsibleCheck() autocmd FileType bash,sh autocmd! BufWritePost <buffer> :call ShellCheck() - autocmd FileType nix autocmd! BufWritePost <buffer> :silent !notify-send -t 10000 "$(nix-linter % 2>&1 && echo 'Nix Lint OK: %')" >/dev/null 2>&1 & + autocmd FileType nix autocmd! BufWritePost <buffer> silent call NixCheck() " REPL commands autocmd FileType go noremap <buffer> <leader>cc :Repl gore<cr> |