mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 09:18:51 +02:00
fix(nvim-lint): dont use default configured linters from nvim-lint
This commit is contained in:
parent
300350686f
commit
ff5f5886db
1 changed files with 4 additions and 12 deletions
|
@ -24,19 +24,12 @@ return {
|
|||
},
|
||||
config = function(_, opts)
|
||||
local M = {}
|
||||
M._did_setup = false
|
||||
|
||||
function M.setup()
|
||||
if M._did_setup then
|
||||
return
|
||||
end
|
||||
local lint = require("lint")
|
||||
for name, linter in pairs(opts.linters) do
|
||||
lint.linters[name] = vim.tbl_deep_extend("force", lint.linters[name] or {}, linter)
|
||||
end
|
||||
lint.linters_by_ft = vim.tbl_extend("force", lint.linters_by_ft, opts.linters_by_ft)
|
||||
M._did_setup = true
|
||||
end
|
||||
lint.linters_by_ft = opts.linters_by_ft
|
||||
|
||||
function M.debounce(ms, fn)
|
||||
local timer = vim.loop.new_timer()
|
||||
|
@ -50,7 +43,6 @@ return {
|
|||
end
|
||||
|
||||
function M.lint()
|
||||
M.setup()
|
||||
local lint = require("lint")
|
||||
local names = lint.linters_by_ft[vim.bo.filetype] or {}
|
||||
local ctx = { filename = vim.api.nvim_buf_get_name(0) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue