Add nix language syntax highlight (#1081)
parent
d6fb5e0c29
commit
b41297e437
|
@ -45,6 +45,7 @@ import {
|
||||||
highlightingQueryParser,
|
highlightingQueryParser,
|
||||||
} from "./markdown_parser/parser.ts";
|
} from "./markdown_parser/parser.ts";
|
||||||
import { cssLanguage } from "@codemirror/lang-css";
|
import { cssLanguage } from "@codemirror/lang-css";
|
||||||
|
import { nixLanguage } from "@replit/codemirror-lang-nix";
|
||||||
|
|
||||||
const yamlStreamLanguage = StreamLanguage.define(yamlLanguage);
|
const yamlStreamLanguage = StreamLanguage.define(yamlLanguage);
|
||||||
|
|
||||||
|
@ -114,6 +115,7 @@ export const builtinLanguages: Record<string, Language> = {
|
||||||
"dockerfile": StreamLanguage.define(dockerfileLanguage),
|
"dockerfile": StreamLanguage.define(dockerfileLanguage),
|
||||||
"cmake": StreamLanguage.define(cmakeLanguage),
|
"cmake": StreamLanguage.define(cmakeLanguage),
|
||||||
"erlang": StreamLanguage.define(erlangLanguage),
|
"erlang": StreamLanguage.define(erlangLanguage),
|
||||||
|
"nix": nixLanguage,
|
||||||
"query": LRLanguage.define({
|
"query": LRLanguage.define({
|
||||||
name: "query",
|
name: "query",
|
||||||
parser: highlightingQueryParser,
|
parser: highlightingQueryParser,
|
||||||
|
|
|
@ -128,6 +128,7 @@
|
||||||
"@lezer/lr": "https://esm.sh/@lezer/lr@1.4.1?external=@lezer/common&target=es2022",
|
"@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",
|
"@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",
|
"@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",
|
"@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/assert": "jsr:@std/assert@^1.0.1",
|
||||||
"@std/cli": "jsr:@std/cli@^1.0.1",
|
"@std/cli": "jsr:@std/cli@^1.0.1",
|
||||||
|
|
Loading…
Reference in New Issue