From 5e81cecfd63ff262868a8a2bdad61beba1923b03 Mon Sep 17 00:00:00 2001 From: Alex Manning Date: Wed, 27 Sep 2023 23:08:36 +0100 Subject: [PATCH] Fix helm indents. --- home/.vimrc.d/dev-environ.vim | 8 +++++++- home/.vimrc.d/filetypes.vim | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/home/.vimrc.d/dev-environ.vim b/home/.vimrc.d/dev-environ.vim index 0dc0019..0faade0 100644 --- a/home/.vimrc.d/dev-environ.vim +++ b/home/.vimrc.d/dev-environ.vim @@ -54,7 +54,7 @@ let g:coc_global_extensions = ['coc-jedi', 'coc-rls', 'coc-tsserver', 'coc-json' let g:vimspector_enable_mappings = 'HUMAN' let g:vimspector_install_gadgets = ['debugpy'] -" Config for ALE originally from their github. +" Config for Coc originally from their github. " Use tab for trigger completion with characters ahead and navigate inoremap \ coc#pum#visible() ? coc#pum#next(1) : @@ -68,3 +68,9 @@ inoremap coc#pum#visible() ? coc#pum#confirm() " Use to trigger completion inoremap coc#refresh() + +" Dependenciy of the above. fom Coc github. +function! CheckBackspace() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction diff --git a/home/.vimrc.d/filetypes.vim b/home/.vimrc.d/filetypes.vim index fc77fa2..75adf6d 100644 --- a/home/.vimrc.d/filetypes.vim +++ b/home/.vimrc.d/filetypes.vim @@ -63,3 +63,11 @@ au BufNewFile,BufRead */.vimrc.d/* set filetype=vim autocmd BufRead,BufNewFile */templates/*.yaml,*/templates/*.tpl,*.gotmpl set ft=helm " Use {{/* */}} as comments autocmd FileType helm setlocal commentstring={{/*\ %s\ */}} +" Same as for yaml above +au FileType helm + \ setlocal tabstop=2 + \ | setlocal softtabstop=2 + \ | setlocal shiftwidth=2 + \ | setlocal expandtab + \ | setlocal autoindent + \ | setlocal fileformat=unix