mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-21 19:11:30 +01:00
vim: add actionlint support (through ALE)
This commit is contained in:
parent
f3bf033fb8
commit
9f566efa8e
|
@ -150,10 +150,3 @@ endfunction
|
||||||
|
|
||||||
command! -nargs=1 -complete=shellcmd Cmd silent call Cmd(<q-args>)
|
command! -nargs=1 -complete=shellcmd Cmd silent call Cmd(<q-args>)
|
||||||
|
|
||||||
" Call actionlint (github actions linter) on current file
|
|
||||||
function ActionLint()
|
|
||||||
call setqflist([])
|
|
||||||
cexpr system('actionlint --oneline ' . expand('%'))
|
|
||||||
copen
|
|
||||||
endfunction
|
|
||||||
command! ActionLint call ActionLint()
|
|
||||||
|
|
|
@ -159,6 +159,3 @@ autocmd FileType python nnoremap T :Pytest function --pdb<CR>
|
||||||
|
|
||||||
" Ultisnips
|
" Ultisnips
|
||||||
map <Leader>ue :UltiSnipsEdit<cr>
|
map <Leader>ue :UltiSnipsEdit<cr>
|
||||||
|
|
||||||
" Github actions linter
|
|
||||||
map <Leader>H :ActionLint<CR>
|
|
||||||
|
|
|
@ -75,6 +75,8 @@ au BufRead *.dvc let b:ale_fix_on_save=0
|
||||||
au BufRead *.dvc set filetype=yaml
|
au BufRead *.dvc set filetype=yaml
|
||||||
|
|
||||||
au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible
|
au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible
|
||||||
|
au BufRead,BufNewFile */.github/*/*.y{,a}ml
|
||||||
|
\ let b:ale_linters = {'yaml': ['actionlint'] }
|
||||||
au BufRead,BufNewFile rules.v[46] *.rules setlocal filetype=iptables
|
au BufRead,BufNewFile rules.v[46] *.rules setlocal filetype=iptables
|
||||||
|
|
||||||
if has('persistent_undo')
|
if has('persistent_undo')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user