From af0d7448982881a5e2d63aff8e2d9c2f47582e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 4 Feb 2024 09:24:35 +0100 Subject: vim: various tweaks and improvements --- install | 1 + vim/ftplugin/nix.vim | 5 +++++ vim/ftplugin/python.vim | 3 --- vim/ftplugin/sh.vim | 1 + vimrc | 12 ++++++++++-- 5 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 vim/ftplugin/nix.vim diff --git a/install b/install index fd5ab1e..b636e03 100755 --- a/install +++ b/install @@ -74,6 +74,7 @@ if ask "dev" "Development tools configuration"; then inst config/mypy/ ~/.config/mypy inst local/bin/new-flake-dev ~/.local/bin/new-flake-dev inst shvcli.ini ~/.shvcli.ini + curl "https://github.com/cyrus-and/gdb-dashboard/raw/master/.gdbinit" > ~/.gdbinit fi if ask "sync" "Install synchronization"; then diff --git a/vim/ftplugin/nix.vim b/vim/ftplugin/nix.vim new file mode 100644 index 0000000..3808c31 --- /dev/null +++ b/vim/ftplugin/nix.vim @@ -0,0 +1,5 @@ +let b:ale_linters = ['nix', 'rnix_lsp', 'statix'] +let b:ale_fixers = ['alejandra', 'remove_trailing_lines', 'trim_whitespace'] + +nmap :ALENext +nmap :ALEPrevious diff --git a/vim/ftplugin/python.vim b/vim/ftplugin/python.vim index c854e6e..55e7692 100644 --- a/vim/ftplugin/python.vim +++ b/vim/ftplugin/python.vim @@ -1,5 +1,2 @@ -setlocal colorcolumn=88 -setlocal textwidth=88 - let b:ale_linters = ['pylsp', 'pylint', 'mypy', 'pydocstyle'] let b:ale_fixers = ['isort', 'black', 'remove_trailing_lines', 'trim_whitespace'] diff --git a/vim/ftplugin/sh.vim b/vim/ftplugin/sh.vim index 8b70524..8cc42e2 100644 --- a/vim/ftplugin/sh.vim +++ b/vim/ftplugin/sh.vim @@ -1 +1,2 @@ let b:ale_linters = ['shell', 'shellcheck'] +let b:ale_fixers = ['shfmt', 'trim_whitespace', 'remove_trailing_lines'] diff --git a/vimrc b/vimrc index b8889dd..7f3a488 100644 --- a/vimrc +++ b/vimrc @@ -200,8 +200,16 @@ let g:UltiSnipsJumpForwardTrigger='' let g:UltiSnipsJumpBackwardTrigger='' " ALE bidings -nmap [ (ale_go_to_definition) -nmap ] (ale_go_to_definition_in_tab) +nmap ] (ale_go_to_definition_in_split) +nmap [ (ale_go_to_implementation_in_split) +nmap [ (ale_go_to_type_definition_in_split) +nmap f (ale_fix) + +" Copy line location +" TODO this should work but it doesn't for some reason +" nmap c :let @+=expand("%:p") . ":" . line(".") +nmap c :exec "!wl-copy '" . expand("%:p") . ":" . line(".") . "'" + " LanguageTool let g:grammarous#languagetool_cmd = 'languagetool' -- cgit v1.2.3