nvim: after/plugin/nvim-lint: Enable actionlint
Run actionlint on save for GitHub Action workflow yaml files.
This commit is contained in:
parent
f37e10c68c
commit
c844fe5874
1 changed files with 9 additions and 0 deletions
|
@ -16,3 +16,12 @@ nvim_lint.linters_by_ft = {
|
||||||
typescript = { 'eslint_d' },
|
typescript = { 'eslint_d' },
|
||||||
yaml = { 'yamllint' },
|
yaml = { 'yamllint' },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||||
|
pattern = "*/.github/workflows/*.y{a,}ml",
|
||||||
|
callback = function()
|
||||||
|
local linter = require('lint').linters.actionlint
|
||||||
|
linter.name = 'actionlint'
|
||||||
|
require("lint").lint(linter)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in a new issue