mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 15:19:26 +02:00
nil check for extended args
This commit is contained in:
parent
11ac140eb5
commit
a3f3f3b60c
1 changed files with 6 additions and 2 deletions
|
@ -11,9 +11,13 @@ O.formatters.filetype["javascriptreact"] = {
|
||||||
function()
|
function()
|
||||||
local args = { "--stdin-filepath", vim.fn.fnameescape(vim.api.nvim_buf_get_name(0)) }
|
local args = { "--stdin-filepath", vim.fn.fnameescape(vim.api.nvim_buf_get_name(0)) }
|
||||||
local extend_args = O.lang.tsserver.formatter.args
|
local extend_args = O.lang.tsserver.formatter.args
|
||||||
|
|
||||||
|
if extend_args then
|
||||||
for i = 1, #extend_args do
|
for i = 1, #extend_args do
|
||||||
table.insert(args, extend_args[i])
|
table.insert(args, extend_args[i])
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
exe = prettier_instance,
|
exe = prettier_instance,
|
||||||
args = args,
|
args = args,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue