mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
fix(lint): make prepend_args opt work when default args is empty (#3828)
## What is this PR for? There's some logic in `linting.lua` to allow for easy setting of linter args, but it doesn't work when default args is empty. This hopefully fixes it. ## Does this PR fix an existing issue? N/A. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
parent
329f9dda80
commit
ff1b44e676
1 changed files with 1 additions and 0 deletions
|
@ -35,6 +35,7 @@ return {
|
||||||
if type(linter) == "table" and type(lint.linters[name]) == "table" then
|
if type(linter) == "table" and type(lint.linters[name]) == "table" then
|
||||||
lint.linters[name] = vim.tbl_deep_extend("force", lint.linters[name], linter)
|
lint.linters[name] = vim.tbl_deep_extend("force", lint.linters[name], linter)
|
||||||
if type(linter.prepend_args) == "table" then
|
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)
|
vim.list_extend(lint.linters[name].args, linter.prepend_args)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue