diff options
author | Pig Fang <g-plane@hotmail.com> | 2024-08-15 04:58:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-14 22:58:48 +0200 |
commit | 3a3315cc7f3466ce229f6f150402d5ccf72b3d1d (patch) | |
tree | a0299679b2c1eb1cee496905caab380a95f22813 /cli/lsp/language_server.rs | |
parent | 22a834ff5b4b312b8f91be8991f2b495d49fad2f (diff) |
feat(fmt): support HTML, Svelte, Vue, Astro and Angular (#25019)
This commit adds capability to format HTML, Svelte, Vue, Astro and Angular
files.
"--unstable-html" is required to format HTML files, and "--unstable-component"
flag is needed to format other formats. These can also be specified in the config
file.
Close #25015
Diffstat (limited to 'cli/lsp/language_server.rs')
-rw-r--r-- | cli/lsp/language_server.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 4bbc7036f..6fa079bd8 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -1372,6 +1372,12 @@ impl Inner { css: maybe_workspace .map(|w| w.has_unstable("fmt-css")) .unwrap_or(false), + html: maybe_workspace + .map(|w| w.has_unstable("fmt-html")) + .unwrap_or(false), + component: maybe_workspace + .map(|w| w.has_unstable("fmt-component")) + .unwrap_or(false), yaml: maybe_workspace .map(|w| w.has_unstable("fmt-yaml")) .unwrap_or(false), |