Update modules/plugins/diagnostics/nvim-lint/config.nix

Co-authored-by: Ching Pei Yang <59727193+horriblename@users.noreply.github.com>
This commit is contained in:
Phan Đăng Khoa 2025-04-13 16:06:42 +07:00 committed by GitHub
commit 5c3a90e3f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,7 +47,13 @@ in {
if linters_from_ft == nil then return end if linters_from_ft == nil then return end
for _, name in ipairs(linters_from_ft) do for _, name in ipairs(linters_from_ft) do
local cwd = linters[name].required_files local linter = linters[name]
assert(linter, 'Linter with name `' .. name .. '` not available')
if type(linter) == "function" then
linter = linter()
end
local cwd = linter.required_files
-- if no configuration files are configured, lint -- if no configuration files are configured, lint
if cwd == nil then if cwd == nil then