Closed1

deno fmtをHelix Editorで使う

ras0qras0q

Denoではパイプで渡すことでstdoutにフォーマット結果を出力できる
deno fmt, code formatting

cat app.svelte | deno fmt --ext svelte --unstable-components -

Helixではstdinにファイルの中身を受け取りstdoutにフォーマット結果を出力することが求められる

The formatter for the language, it will take precedence over the lsp when defined. The formatter must be able to take the original file as input from stdin and write the formatted file to stdout
Languages

language.toml
[[language]]
name = "svelte"
formatter = { command = "deno", args = ["fmt", "--unstable-component", "--ext", "svelte", "-"] }
auto-format = true
このスクラップは3ヶ月前にクローズされました