feat: format with prettier via stdin

This commit is contained in:
Michael Mandl 2022-03-08 08:33:07 +01:00
parent f61bd1aa89
commit bedd106416
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7

View file

@ -31,21 +31,25 @@ 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 --parser html"} formatCommand = "yarn run --silent prettier --stdin-filepath ${INPUT} --parser html",
formatStdin = true
}, },
typescript = { typescript = {
{ {
formatCommand = "yarn run --silent prettier --parser typescript" formatCommand = "yarn run --silent prettier --stdin-filepath ${INPUT} --parser typescript",
formatStdin = true
} }
}, },
typescriptreact = { typescriptreact = {
{ {
formatCommand = "yarn run --silent prettier --parser typescript" formatCommand = "yarn run --silent prettier --stdin-filepath ${INPUT} --parser typescript",
formatStdin = true
} }
}, },
markdown = { markdown = {
{ {
formatCommand = "yarn run --silent prettier --parser markdown" formatCommand = "yarn run --silent prettier --stdin-filepath ${INPUT} --parser markdown",
formatStdin = true
} }
} }
} }