Open ericwomer opened 1 week ago
So is this not a bug? Just optimization?
local linter_args = lint.linters.luacheck.args or {}
local new_args = {
"--globals",
"love",
"vim",
}
vim.list_extend(linter_args, new_args)
or unpack
lint.linters.luacheck.args = {
unpack(lint.linters.luacheck.args),
"--globals",
"love",
"vim",
}
All the version seem to work just fine. But i do see the value of appending to the defaults.
If you do
You don't have to write out all of the default settings along with your custom settings.
Depending on how big the default settings are for specific plugins/apps it may be shorter to type them out, but with luacheck it seems simpler to append to the table then to write everything out by hand.
extra_args seems like its supposed to be a solution but it seems ignored in this case, which is why everyone else's fixes seem like not. The "--" I assume is bash for end of parameters as noted here
If you prefer an option saving the args previous before setting it you can do it with a variable via something like
Though this is something that should be handled internally for the most part inside of NvChads configs.