feat: format with prettier via stdin
This commit is contained in:
parent
f61bd1aa89
commit
bedd106416
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user