mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-29 06:18:18 +02:00
[Bugfix] Support extending null builtin args (#1317)
This commit is contained in:
parent
0fbf66e379
commit
6e0f56f09e
2 changed files with 4 additions and 14 deletions
|
@ -7,14 +7,9 @@ local logger = require("core.log"):get_default()
|
||||||
|
|
||||||
local function list_names(formatters, options)
|
local function list_names(formatters, options)
|
||||||
options = options or {}
|
options = options or {}
|
||||||
local names = {}
|
|
||||||
|
|
||||||
local filter = options.filter or "supported"
|
local filter = options.filter or "supported"
|
||||||
for name, _ in pairs(formatters[filter]) do
|
|
||||||
table.insert(names, name)
|
|
||||||
end
|
|
||||||
|
|
||||||
return names
|
return vim.tbl_keys(formatters[filter])
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.list_supported_names(filetype)
|
function M.list_supported_names(filetype)
|
||||||
|
@ -59,7 +54,7 @@ function M.list_configured(formatter_configs)
|
||||||
errors[fmt_config.exe] = {} -- Add data here when necessary
|
errors[fmt_config.exe] = {} -- Add data here when necessary
|
||||||
else
|
else
|
||||||
logger.info("Using formatter:", formatter_cmd)
|
logger.info("Using formatter:", formatter_cmd)
|
||||||
formatters[fmt_config.exe] = formatter.with { command = formatter_cmd, args = fmt_config.args }
|
formatters[fmt_config.exe] = formatter.with { command = formatter_cmd, extra_args = fmt_config.args }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,14 +7,9 @@ local logger = require("core.log"):get_default()
|
||||||
|
|
||||||
local function list_names(linters, options)
|
local function list_names(linters, options)
|
||||||
options = options or {}
|
options = options or {}
|
||||||
local names = {}
|
|
||||||
|
|
||||||
local filter = options.filter or "supported"
|
local filter = options.filter or "supported"
|
||||||
for name, _ in pairs(linters[filter]) do
|
|
||||||
table.insert(names, name)
|
|
||||||
end
|
|
||||||
|
|
||||||
return names
|
return vim.tbl_keys(linters[filter])
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.list_supported_names(filetype)
|
function M.list_supported_names(filetype)
|
||||||
|
@ -59,7 +54,7 @@ function M.list_configured(linter_configs)
|
||||||
errors[lnt_config.exe] = {} -- Add data here when necessary
|
errors[lnt_config.exe] = {} -- Add data here when necessary
|
||||||
else
|
else
|
||||||
logger.info("Using linter:", linter_cmd)
|
logger.info("Using linter:", linter_cmd)
|
||||||
linters[lnt_config.exe] = linter.with { command = linter_cmd, args = lnt_config.args }
|
linters[lnt_config.exe] = linter.with { command = linter_cmd, extra_args = lnt_config.args }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue