nvim-lint: add linters option

This commit is contained in:
Ching Pei Yang 2025-03-27 16:32:44 +01:00
commit 7e1ffe40f5
No known key found for this signature in database
GPG key ID: B3841364253DC4C8
2 changed files with 107 additions and 1 deletions

View file

@ -16,6 +16,18 @@ in {
startPlugins = ["nvim-lint"];
pluginRC.nvim-lint = entryAnywhere ''
require("lint").linters_by_ft = ${toLuaObject cfg.linters_by_ft}
local linters = require("lint").linters
local nvf_linters = ${toLuaObject cfg.linters}
for linter, config in pairs(nvf_linters) do
if linters[linter] == nil then
linters[linter] = config
else
for key, val in pairs(config) do
linters[linter][key] = val
end
end
end
'';
};
})