mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-22 12:31:07 +00:00
Merge 03ad39320c into 459a4c3b10
This commit is contained in:
commit
32676fe715
1 changed files with 7 additions and 1 deletions
|
|
@ -32,13 +32,19 @@ return {
|
|||
config = function(_, opts)
|
||||
local M = {}
|
||||
|
||||
local function list_prepend(dst, src)
|
||||
for i = 1, #src do
|
||||
table.insert(dst, i, src[i])
|
||||
end
|
||||
end
|
||||
|
||||
local lint = require("lint")
|
||||
for name, linter in pairs(opts.linters) do
|
||||
if type(linter) == "table" and type(lint.linters[name]) == "table" then
|
||||
lint.linters[name] = vim.tbl_deep_extend("force", lint.linters[name], linter)
|
||||
if type(linter.prepend_args) == "table" then
|
||||
lint.linters[name].args = lint.linters[name].args or {}
|
||||
vim.list_extend(lint.linters[name].args, linter.prepend_args)
|
||||
list_prepend(lint.linters[name].args, linter.prepend_args)
|
||||
end
|
||||
else
|
||||
lint.linters[name] = linter
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue