mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 02:55:09 +02:00
Fix tsserver formatter not working (#925)
This commit is contained in:
parent
abab0d5e82
commit
946b251233
2 changed files with 7 additions and 2 deletions
|
@ -309,7 +309,7 @@ O = {
|
|||
},
|
||||
formatter = {
|
||||
exe = "prettier",
|
||||
args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote" },
|
||||
args = {},
|
||||
},
|
||||
},
|
||||
vim = {},
|
||||
|
|
|
@ -9,9 +9,14 @@ end
|
|||
|
||||
O.formatters.filetype["javascriptreact"] = {
|
||||
function()
|
||||
local args = { "--stdin-filepath", vim.fn.fnameescape(vim.api.nvim_buf_get_name(0)) }
|
||||
local extend_args = O.lang.tsserver.formatter.args
|
||||
for i = 1, #extend_args do
|
||||
table.insert(args, extend_args[i])
|
||||
end
|
||||
return {
|
||||
exe = prettier_instance,
|
||||
args = O.lang.tsserver.formatter.args,
|
||||
args = args,
|
||||
stdin = true,
|
||||
}
|
||||
end,
|
||||
|
|
Loading…
Reference in a new issue