fix(nvim-lint): do not lint on any type of buffer
This commit is contained in:
parent
a02689e635
commit
a8659027b6
1 changed files with 7 additions and 6 deletions
|
|
@ -40,8 +40,9 @@ return {
|
||||||
lua = { "woke" },
|
lua = { "woke" },
|
||||||
ansible = { "woke" },
|
ansible = { "woke" },
|
||||||
markdown = { "woke", "proselint", "write_good" },
|
markdown = { "woke", "proselint", "write_good" },
|
||||||
text = { "woke", "proselint", "write_good" },
|
text = { "gitleaks", "proselint", "write_good" },
|
||||||
sh = { "woke" },
|
sh = { "gitleaks", "woke" },
|
||||||
|
bash = { "gitleaks" },
|
||||||
go = { "golangcilint" },
|
go = { "golangcilint" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -50,14 +51,14 @@ return {
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufReadPost", "BufWritePost", "InsertLeave" }, {
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufReadPost", "BufWritePost", "InsertLeave" }, {
|
||||||
group = lint_augroup,
|
group = lint_augroup,
|
||||||
callback = function()
|
callback = function()
|
||||||
lint.try_lint() -- linters_by_ft
|
lint.try_lint() -- linters_by_ft
|
||||||
lint.try_lint("gitleaks") -- on all ft
|
-- lint.try_lint("gitleaks") -- on all ft
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>l", function()
|
vim.keymap.set("n", "<leader>l", function()
|
||||||
lint.try_lint() -- linters_by_ft
|
lint.try_lint() -- linters_by_ft
|
||||||
lint.try_lint("gitleaks") -- on all ft
|
-- lint.try_lint("gitleaks") -- on all ft
|
||||||
end, { desc = "Lint current file" })
|
end, { desc = "Lint current file" })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue