From 3a3315cc7f3466ce229f6f150402d5ccf72b3d1d Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Thu, 15 Aug 2024 04:58:48 +0800 Subject: 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 --- cli/lsp/language_server.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cli/lsp') 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), -- cgit v1.2.3