| /** | |
| * Extension → VS Code language id, used by `iconResolver` as a fallback when | |
| * material-icon-theme's `fileExtensions` map lacks an entry. material-icon-theme | |
| * relies on VS Code's extension→languageId registry for many common files | |
| * (ts, js, html, css, sh, sql…). Without this layer, plain `foo.ts` would | |
| * fall back to the generic file icon. | |
| * | |
| * Add entries when a popular extension renders without an icon. Keys are | |
| * lowercase, dot-less. Values must exist in `manifest.languageIds`. | |
| */ | |
| export const EXT_TO_LANGUAGE_ID: Record<string, string> = { | |
| ts: "typescript", | |
| cts: "typescript", | |
| mts: "typescript", | |
| tsx: "typescriptreact", | |
| js: "javascript", | |
| cjs: "javascript", | |
| mjs: "javascript", | |
| jsx: "javascriptreact", | |
| html: "html", | |
| htm: "html", | |
| css: "css", | |
| scss: "scss", | |
| sass: "sass", | |
| less: "less", | |
| json: "json", | |
| jsonc: "jsonc", | |
| md: "markdown", | |
| markdown: "markdown", | |
| py: "python", | |
| rs: "rust", | |
| go: "go", | |
| java: "java", | |
| kt: "kotlin", | |
| kts: "kotlin", | |
| rb: "ruby", | |
| php: "php", | |
| c: "c", | |
| h: "c", | |
| cpp: "cpp", | |
| cc: "cpp", | |
| cxx: "cpp", | |
| hpp: "cpp", | |
| cs: "csharp", | |
| swift: "swift", | |
| sh: "shellscript", | |
| bash: "shellscript", | |
| zsh: "shellscript", | |
| fish: "shellscript", | |
| sql: "sql", | |
| xml: "xml", | |
| yaml: "yaml", | |
| yml: "yaml", | |
| toml: "toml", | |
| vue: "vue", | |
| svelte: "svelte", | |
| astro: "astro", | |
| lua: "lua", | |
| dart: "dart", | |
| r: "r", | |
| pl: "perl", | |
| ex: "elixir", | |
| exs: "elixir", | |
| elm: "elm", | |
| hs: "haskell", | |
| clj: "clojure", | |
| scala: "scala", | |
| zig: "zig", | |
| nim: "nim", | |
| log: "log", | |
| }; | |