Add nix language syntax highlight (#1081)

lua
Abin Simon 2024-09-09 22:57:02 +05:30 committed by GitHub
parent d6fb5e0c29
commit b41297e437
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,7 @@ import {
highlightingQueryParser,
} from "./markdown_parser/parser.ts";
import { cssLanguage } from "@codemirror/lang-css";
import { nixLanguage } from "@replit/codemirror-lang-nix";
const yamlStreamLanguage = StreamLanguage.define(yamlLanguage);
@ -114,6 +115,7 @@ export const builtinLanguages: Record<string, Language> = {
"dockerfile": StreamLanguage.define(dockerfileLanguage),
"cmake": StreamLanguage.define(cmakeLanguage),
"erlang": StreamLanguage.define(erlangLanguage),
"nix": nixLanguage,
"query": LRLanguage.define({
name: "query",
parser: highlightingQueryParser,

View File

@ -128,6 +128,7 @@
"@lezer/lr": "https://esm.sh/@lezer/lr@1.4.1?external=@lezer/common&target=es2022",
"@lezer/markdown": "https://esm.sh/@lezer/markdown@1.3.0?external=@lezer/common,@codemirror/language,@lezer/highlight,@lezer/lr&target=es2022",
"@luca/esbuild-deno-loader": "jsr:@luca/esbuild-deno-loader@^0.10.3",
"@replit/codemirror-lang-nix": "https://esm.sh/@replit/codemirror-lang-nix@6.0.1?external=@codemirror/language,@codemirror/autocomplete,@codemirror/state,@lezer/highlight,@lezer/lr&target=es2022",
"@replit/codemirror-vim": "https://esm.sh/@replit/codemirror-vim@6.2.1?external=@codemirror/state,@codemirror/language,@codemirror/view,@codemirror/search,@codemirror/commands",
"@std/assert": "jsr:@std/assert@^1.0.1",
"@std/cli": "jsr:@std/cli@^1.0.1",