feat: format with prettier via stdin

main
mandlm 2022-03-08 08:33:07 +01:00
parent f61bd1aa89
commit bedd106416
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
1 changed files with 8 additions and 4 deletions

View File

@ -31,21 +31,25 @@ local extra_server_opts = {
languages = {
lua = {{formatCommand = "lua-format -i", formatStdin = true}},
html = {
{formatCommand = "yarn run --silent prettier --parser html"}
formatCommand = "yarn run --silent prettier --stdin-filepath ${INPUT} --parser html",
formatStdin = true
},
typescript = {
{
formatCommand = "yarn run --silent prettier --parser typescript"
formatCommand = "yarn run --silent prettier --stdin-filepath ${INPUT} --parser typescript",
formatStdin = true
}
},
typescriptreact = {
{
formatCommand = "yarn run --silent prettier --parser typescript"
formatCommand = "yarn run --silent prettier --stdin-filepath ${INPUT} --parser typescript",
formatStdin = true
}
},
markdown = {
{
formatCommand = "yarn run --silent prettier --parser markdown"
formatCommand = "yarn run --silent prettier --stdin-filepath ${INPUT} --parser markdown",
formatStdin = true
}
}
}