fix(nvim-lint): dont use default configured linters from nvim-lint
This commit is contained in:
@ -24,19 +24,12 @@ return {
|
|||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local M = {}
|
local M = {}
|
||||||
M._did_setup = false
|
|
||||||
|
|
||||||
function M.setup()
|
local lint = require("lint")
|
||||||
if M._did_setup then
|
for name, linter in pairs(opts.linters) do
|
||||||
return
|
lint.linters[name] = vim.tbl_deep_extend("force", lint.linters[name] or {}, linter)
|
||||||
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
|
end
|
||||||
|
lint.linters_by_ft = opts.linters_by_ft
|
||||||
|
|
||||||
function M.debounce(ms, fn)
|
function M.debounce(ms, fn)
|
||||||
local timer = vim.loop.new_timer()
|
local timer = vim.loop.new_timer()
|
||||||
@ -50,7 +43,6 @@ return {
|
|||||||
end
|
end
|
||||||
|
|
||||||
function M.lint()
|
function M.lint()
|
||||||
M.setup()
|
|
||||||
local lint = require("lint")
|
local lint = require("lint")
|
||||||
local names = lint.linters_by_ft[vim.bo.filetype] or {}
|
local names = lint.linters_by_ft[vim.bo.filetype] or {}
|
||||||
local ctx = { filename = vim.api.nvim_buf_get_name(0) }
|
local ctx = { filename = vim.api.nvim_buf_get_name(0) }
|
||||||
|
Reference in New Issue
Block a user