1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-12-22 15:21:30 +01:00

vim: add actionlint support (through ALE)

This commit is contained in:
bretello 2022-05-03 10:16:33 +02:00
parent f3bf033fb8
commit 9f566efa8e
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
3 changed files with 2 additions and 10 deletions

View File

@ -150,10 +150,3 @@ endfunction
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()

View File

@ -159,6 +159,3 @@ autocmd FileType python nnoremap T :Pytest function --pdb<CR>
" Ultisnips
map <Leader>ue :UltiSnipsEdit<cr>
" Github actions linter
map <Leader>H :ActionLint<CR>

View File

@ -75,6 +75,8 @@ au BufRead *.dvc let b:ale_fix_on_save=0
au BufRead *.dvc set filetype=yaml
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
if has('persistent_undo')