diff --git a/editors/vscode/client/tools/formatter.ts b/editors/vscode/client/tools/formatter.ts index f10db54634500..9bdcf3765bfa1 100644 --- a/editors/vscode/client/tools/formatter.ts +++ b/editors/vscode/client/tools/formatter.ts @@ -108,6 +108,90 @@ export default class FormatterTool implements ToolInterface { // https://github.com/oxc-project/oxc/blob/f3e9913f534e36195b9b5a6244dd21076ed8715e/crates/oxc_formatter/src/service/parse_utils.rs#L73 // allow `*.start.frag` and `*.end.frag`, "frag", + // https://github.com/oxc-project/oxc/pull/16524/ + // JSON + "json", + "4DForm", + "4DProject", + "avsc", + "geojson", + "gltf", + "har", + "ice", + "JSON-tmLanguage", + "json.example", + "mcmeta", + "sarif", + "tact", + "tfstate", + "tfstate.backup", + "topojson", + "webapp", + "webmanifest", + "yy", + "yyp", + // JSONC + "jsonc", + "code-snippets", + "code-workspace", + "sublime-build", + "sublime-color-scheme", + "sublime-commands", + "sublime-completions", + "sublime-keymap", + "sublime-macro", + "sublime-menu", + "sublime-mousemap", + "sublime-project", + "sublime-settings", + "sublime-theme", + "sublime-workspace", + "sublime_metrics", + "sublime_session", + // HTML + "html", + "hta", + "htm", + "inc", + "xht", + "xhtml", + // CSS + "css", + "wxss", + "pcss", + "postcss", + // GraphQL + "graphql", + "gql", + "graphqls", + // Handlebars + "handlebars", + "hbs", + // Markdown + "md", + "livemd", + "markdown", + "mdown", + "mdwn", + "mkd", + "mkdn", + "mkdown", + "ronn", + "scd", + "workbook", + // YAML + "yml", + "mir", + "reek", + "rviz", + "sublime-syntax", + "syntax", + "yaml", + "yaml-tmlanguage", + // https://github.com/oxc-project/oxc/pull/17113/ + // TOML + "toml", + "toml.example", ]; // Special filenames that are valid JS files @@ -118,6 +202,41 @@ export default class FormatterTool implements ToolInterface { // covered by the "frag" extension above // "start.frag", // "end.frag", + + // JSON filenames + ".all-contributorsrc", + ".arcconfig", + ".auto-changelog", + ".c8rc", + ".htmlhintrc", + ".imgbotconfig", + ".nycrc", + ".tern-config", + ".tern-project", + ".watchmanconfig", + ".babelrc", + ".jscsrc", + ".jshintrc", + ".jslintrc", + ".swcrc", + // Markdown filenames + "contents.lr", + "README", + // YAML filenames + ".clang-format", + ".clang-tidy", + ".clangd", + ".gemrc", + "CITATION.cff", + "glide.lock", + "pixi.lock", + ".prettierrc", + ".stylelintrc", + ".lintstagedrc", + // https://github.com/oxc-project/oxc/pull/17113/ + // TOML filenames + "Pipfile", + "Cargo.toml.orig", ]; // If the extension is launched in debug mode then the debug server options are used