feat(editor): add syntax highlighting for go.mod and go.work files (#1695)

go.mod and go.work opened as plain text: their language definitions had no ui-mode, so no CodeMirror language loaded. Add a GoMod mode (a small stream parser): directives as keywords, module paths as strings, versions as numbers, // comments; shared by go.mod and go.work.

Co-authored-by: elfadl <[email protected]>
Цей коміт міститься в:
Kamal ElFadlтаelfadl authored and GitHub committed 2026-11-07 11:12:41 +08:00
1 джерело 1af1744290
коміт 14a31fe8a1
7 files changed
+196 -1

No files matched your search

+1
Переглянути файл
@@ -605,6 +605,7 @@ mod tests {
"ERB",
"JSP",
"Astro",
"GoMod",
];
fn reg() -> LanguageRegistry {