mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 08:53:31 +02:00
add: cocnform ignore patern and nvimlint ignore patern
This commit is contained in:
parent
77ec605527
commit
5fe2180144
6 changed files with 25 additions and 7 deletions
|
@ -64,6 +64,10 @@ return {
|
|||
["yamllint"] = "yamllint",
|
||||
}
|
||||
|
||||
local ignore = {
|
||||
["php"] = "tlint",
|
||||
}
|
||||
|
||||
for _, pkg in pairs(mason_reg.get_installed_packages()) do
|
||||
for _, type in pairs(pkg.spec.categories) do
|
||||
-- only act upon a formatter
|
||||
|
@ -79,8 +83,10 @@ return {
|
|||
if name_map[pkg.spec.name] ~= nil then
|
||||
pkg.spec.name = name_map[pkg.spec.name]
|
||||
end
|
||||
opts.linters_by_ft[ftl] = opts.linters_by_ft[ftl] or {}
|
||||
table.insert(opts.linters_by_ft[ftl], pkg.spec.name)
|
||||
if ignore[ftl] ~= pkg.spec.name then
|
||||
opts.linters_by_ft[ftl] = opts.linters_by_ft[ftl] or {}
|
||||
table.insert(opts.linters_by_ft[ftl], pkg.spec.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue