nvim: after/plugin/nvim-lint: Enable actionlint

Run actionlint on save for GitHub Action workflow yaml files.
This commit is contained in:
Sanchayan Maity 2023-05-18 15:25:03 +05:30
parent f37e10c68c
commit c844fe5874
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -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,
})