diff --git a/states/neovim/init.vim.j2 b/states/neovim/init.vim.j2 index 7824d88..41222f6 100644 --- a/states/neovim/init.vim.j2 +++ b/states/neovim/init.vim.j2 @@ -20,6 +20,14 @@ syntax on " NeoVIM sets {{- cfg("set", neovim.config.sets) }} +function! RemoveComments() + "silent %s/\t/ /g + silent %s/ *#.*//g + silent g/^#/d + silent g/^$/d + silent sort +endfunction + nnoremap :!%:p if has("autocmd") diff --git a/states/neovim/plugins.sls b/states/neovim/plugins.sls index 047174d..b4eef19 100644 --- a/states/neovim/plugins.sls +++ b/states/neovim/plugins.sls @@ -17,5 +17,7 @@ neovim-plugin-{{ value.name }}: git.latest: - name: {{ value.repo }} - target: {{ neovim.plugins_dir }}/{{ value.name }} + - rev: {{ value.rev|default('HEAD') }} + - force_reset: true - submodules: true {%- endfor %}