Add go snippet support (#709)

pull/714/head
Viktoras 2024-02-14 23:35:45 +02:00 committed by GitHub
parent 352c064420
commit 740b3a7664
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -59,6 +59,7 @@ export { toml as tomlLanguage } from "@codemirror/legacy-modes/mode/toml?externa
export { xml as xmlLanguage } from "@codemirror/legacy-modes/mode/xml?external=@codemirror/language&target=es2022";
export { json as jsonLanguage } from "@codemirror/legacy-modes/mode/javascript?external=@codemirror/language&target=es2022";
export { htmlLanguage } from "@codemirror/lang-html";
export { go as goLanguage } from "@codemirror/legacy-modes/mode/go?external=@codemirror/language&target=es2022";
export { Language, StreamLanguage } from "@codemirror/language";

View File

@ -24,6 +24,7 @@ import {
typescriptLanguage,
xmlLanguage,
yamlLanguage,
goLanguage,
} from "./deps.ts";
import {
extendedMarkdownLanguage,
@ -83,6 +84,8 @@ export const builtinLanguages: Record<string, Language> = {
"objective-c++": StreamLanguage.define(objectiveCppLanguage),
"objectivec++": StreamLanguage.define(objectiveCppLanguage),
"dart": StreamLanguage.define(dartLanguage),
"go": StreamLanguage.define(goLanguage),
"golang": StreamLanguage.define(goLanguage),
"query": LRLanguage.define({
name: "query",
parser: highlightingQueryParser,