feat: add more language support

This commit is contained in:
DuroCodes
2025-04-20 23:05:32 -04:00
parent 3cf6a59d22
commit 0616f82c26
2 changed files with 160 additions and 11 deletions

View File

@@ -28,6 +28,8 @@ export function MonacoEditor() {
.filter(([key]) => key !== theme)
.map(([key, value]) => value.theme ?? key);
LANGUAGES.forEach((l) => monaco.languages.register({ id: l }));
const highlighter = await createHighlighter({
themes: [currentTheme, ...restThemes],
langs: LANGUAGES,

View File

@@ -1,64 +1,211 @@
export const LANGUAGES = [
"plaintext",
"text",
"abap",
"actionscript-3",
"ada",
"angular-html",
"angular-ts",
"apache",
"apex",
"apl",
"applescript",
"ara",
"asciidoc",
"asm",
"astro",
"awk",
"ballerina",
"bat",
"beancount",
"berry",
"bibtex",
"bicep",
"clojure",
"coffeescript",
"blade",
"bsl",
"c",
"cpp",
"csharp",
"cadence",
"cairo",
"clarity",
"clojure",
"cmake",
"cobol",
"codeowners",
"codeql",
"coffeescript",
"common-lisp",
"coq",
"c++",
"crystal",
"c#",
"css",
"csv",
"cue",
"cypher",
"d",
"dart",
"dockerfile",
"dax",
"desktop",
"diff",
"docker",
"dotenv",
"dream-maker",
"edge",
"elixir",
"fsharp",
"elm",
"emacs-lisp",
"erb",
"erlang",
"fennel",
"fish",
"fluent",
"f#",
"gdresource",
"gdscript",
"gdshader",
"genie",
"gherkin",
"git-commit",
"git-rebase",
"gleam",
"glsl",
"gnuplot",
"go",
"graphql",
"groovy",
"hack",
"haml",
"handlebars",
"haskell",
"haxe",
"hcl",
"hjson",
"hlsl",
"html",
"http",
"hxml",
"hy",
"imba",
"ini",
"java",
"javascript",
"jinja",
"json",
"json5",
"jsonnet",
"jssm",
"jsx",
"julia",
"kotlin",
"kusto",
"latex",
"lean",
"less",
"lua",
"liquid",
"llvm",
"log",
"logo",
"lua",
"luau",
"make",
"markdown",
"matlab",
"mdc",
"mdx",
"mips",
"mermaid",
"mipsasm",
"mojo",
"move",
"narrat",
"nextflow",
"nginx",
"nim",
"nix",
"nushell",
"objective-c",
"objective-cpp",
"ocaml",
"pascal",
"perl",
"php",
"plsql",
"po",
"polar",
"postcss",
"powerquery",
"powershell",
"prisma",
"prolog",
"proto",
"pug",
"puppet",
"purescript",
"python",
"qml",
"qss",
"r",
"racket",
"raku",
"razor",
"reg",
"regex",
"rel",
"riscv",
"rst",
"ruby",
"rust",
"sas",
"sass",
"scala",
"scheme",
"scss",
"sdbl",
"shaderlab",
"shell",
"smalltalk",
"solidity",
"soy",
"sparql",
"splunk",
"sql",
"ssh-config",
"stata",
"stylus",
"svelte",
"swift",
"verilog",
"system-verilog",
"systemd",
"talonscript",
"tasl",
"tcl",
"templ",
"terraform",
"tex",
"toml",
"ts-tags",
"tsv",
"tsx",
"turtle",
"twig",
"typescript",
"typespec",
"typst",
"v",
"vala",
"vb",
"verilog",
"vhdl",
"viml",
"vue",
"vyper",
"wasm",
"wenyan",
"wgsl",
"wikitext",
"wit",
"wolfram",
"xml",
"xsl",
"yaml",
"json",
"zenscript",
"zig",
];