From 834da58bc5b408d4e2f377bc7ed84a707c1b72a6 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Thu, 20 Apr 2023 15:42:24 -0400 Subject: [PATCH] Setup shfmt in nvim --- home/.config/nvim/init.vim | 5 +++++ pkgs-void.list | 1 + 2 files changed, 6 insertions(+) diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim index 47f1b02..0930301 100644 --- a/home/.config/nvim/init.vim +++ b/home/.config/nvim/init.vim @@ -9,6 +9,7 @@ " Run :PlugInstall after adding a new plugin call plug#begin() +Plug 'z0mbix/vim-shfmt', { 'for': 'sh' } Plug 'dense-analysis/ale' " Syntastic's spiritual succesor Plug 'preservim/nerdtree' "Plug 'nvim-tree/nvim-web-devicons' " Needs patched fonts: https://www.nerdfonts.com/ @@ -44,6 +45,10 @@ let NERDTreeShowLineNumbers=1 " rust.vim let g:rustfmt_autosave = 1 +" shfmt +let g:shfmt_extra_args = '--indent 4 --language-dialect bash' +" let g:shfmt_fmt_on_save = 1 " on-save probably to invasive to mod existing scripts. + "============================================================================== " Defaults "============================================================================== diff --git a/pkgs-void.list b/pkgs-void.list index 5464245..24d9e22 100644 --- a/pkgs-void.list +++ b/pkgs-void.list @@ -358,6 +358,7 @@ SDL2-devel sent setxkbmap shellcheck +shfmt Signal-Desktop slack-desktop slop -- 2.20.1