feat: enable javascript formatting
This commit is contained in:
parent
8eb820689a
commit
cc4da2fb2d
@ -22,7 +22,7 @@ end
|
|||||||
local extra_server_opts = {
|
local extra_server_opts = {
|
||||||
["efm"] = function(opts)
|
["efm"] = function(opts)
|
||||||
opts.filetypes = {
|
opts.filetypes = {
|
||||||
"lua", "html", "markdown", "typescript", "typescriptreact"
|
"lua", "html", "javascript", "markdown", "typescript", "typescriptreact"
|
||||||
}
|
}
|
||||||
opts.init_options = {documentFormatting = true}
|
opts.init_options = {documentFormatting = true}
|
||||||
opts.settings = {
|
opts.settings = {
|
||||||
@ -30,8 +30,16 @@ local extra_server_opts = {
|
|||||||
languages = {
|
languages = {
|
||||||
lua = {{formatCommand = "lua-format -i", formatStdin = true}},
|
lua = {{formatCommand = "lua-format -i", formatStdin = true}},
|
||||||
html = {
|
html = {
|
||||||
formatCommand = "yarn run --silent prettier --stdin-filepath ${INPUT} --parser html",
|
{
|
||||||
formatStdin = true
|
formatCommand = "yarn run --silent prettier --stdin-filepath ${INPUT} --parser html",
|
||||||
|
formatStdin = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
javascript = {
|
||||||
|
{
|
||||||
|
formatCommand = "prettier --stdin-filepath ${INPUT}",
|
||||||
|
formatStdin = true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
typescript = {
|
typescript = {
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user