Fix helm indents.

This commit is contained in:
Alex Manning 2023-09-27 23:08:36 +01:00
parent e9468fb693
commit 5e81cecfd6
2 changed files with 15 additions and 1 deletions

View file

@ -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_enable_mappings = 'HUMAN'
let g:vimspector_install_gadgets = ['debugpy'] 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 " Use tab for trigger completion with characters ahead and navigate
inoremap <silent><expr> <TAB> inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1) : \ coc#pum#visible() ? coc#pum#next(1) :
@ -68,3 +68,9 @@ inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
" Use <c-space> to trigger completion " Use <c-space> to trigger completion
inoremap <silent><expr> <c-@> coc#refresh() inoremap <silent><expr> <c-@> coc#refresh()
" Dependenciy of the above. fom Coc github.
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction

View file

@ -63,3 +63,11 @@ au BufNewFile,BufRead */.vimrc.d/* set filetype=vim
autocmd BufRead,BufNewFile */templates/*.yaml,*/templates/*.tpl,*.gotmpl set ft=helm autocmd BufRead,BufNewFile */templates/*.yaml,*/templates/*.tpl,*.gotmpl set ft=helm
" Use {{/* */}} as comments " Use {{/* */}} as comments
autocmd FileType helm setlocal commentstring={{/*\ %s\ */}} 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