feat: enable javascript formatting

main
mandlm 2022-04-02 10:51:56 +02:00
parent 8eb820689a
commit cc4da2fb2d
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
1 changed files with 11 additions and 3 deletions

View File

@ -22,7 +22,7 @@ end
local extra_server_opts = {
["efm"] = function(opts)
opts.filetypes = {
"lua", "html", "markdown", "typescript", "typescriptreact"
"lua", "html", "javascript", "markdown", "typescript", "typescriptreact"
}
opts.init_options = {documentFormatting = true}
opts.settings = {
@ -30,8 +30,16 @@ local extra_server_opts = {
languages = {
lua = {{formatCommand = "lua-format -i", formatStdin = true}},
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 = {
{