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

vim: improve yaml handling (ansible/gha)

This commit is contained in:
bretello 2024-08-12 18:05:51 +02:00
parent 48a27f8c1c
commit 90654028f0
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
2 changed files with 9 additions and 5 deletions

View File

@ -40,16 +40,18 @@ let g:ale_python_mypy_options = '--ignore-missing-imports'
let g:ale_rust_cargo_use_clippy = 1
let g:ale_linters = {
\ 'bash': ['bash-language-server', 'bashlint', 'shellcheck'],
\ 'bash': ['bash-language-server', 'bashlint', 'shellcheck', 'shell'],
\ 'dockerfile': ['hadolint'],
\ 'zsh': ['bashlint', 'shellcheck'],
\ 'zsh': ['bashlint', 'shellcheck', 'shell'],
\ 'c': ['ccls', 'clangd'],
\ 'cpp': ['clangd'],
\ 'qml': ['qmllint'],
\ 'python': ['pylsp', 'mypy', 'ruff'],
\ 'go': ['gopls', 'gobuild'],
\ 'rust': ['analyzer', 'cargo'],
\ 'yaml': ['yamllint'],
\ 'yaml.gha': ['actionlint', 'yamllint', 'yaml-language-server'],
\ 'yaml.ansible': ['yamllint', 'ansible-language-server', 'ansible-lint', 'yaml-language-server'],
\ 'yaml': ['yaml-language-server', 'yamllint'],
\ 'javascript': ['yarn lint', 'eslint'],
\ 'xml': ['android'],
\ 'groovy': ['android'],

View File

@ -95,11 +95,13 @@ augroup END
augroup ansible
au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible
au BufRead,BufNewFile */tasks/*.yml set filetype=yaml.ansible
au BufRead,BufNewFile playbook.yml set filetype=yaml.ansible
augroup END
augroup githubactions
au BufRead,BufNewFile */.github/*/*.y{,a}ml
\ let b:ale_linters = {'yaml': ['actionlint'] }
au BufRead,BufReadPost,BufNewFile */.github/*/*.y{,a}ml set filetype=yaml.gha
""|let b:ale_linters = {'yaml': ['actionlint']}
augroup END
augroup iptables