Merge "Show Line Length Indicator at 72 Characters for Commit Messages"
diff --git a/web/BUILD b/web/BUILD
index fe28a56..000b199 100644
--- a/web/BUILD
+++ b/web/BUILD
@@ -59,6 +59,7 @@
"@plugins_npm//@codemirror/commands",
"@plugins_npm//@codemirror/lang-css",
"@plugins_npm//@codemirror/lang-cpp",
+ "@plugins_npm//@codemirror/lang-go",
"@plugins_npm//@codemirror/lang-html",
"@plugins_npm//@codemirror/lang-java",
"@plugins_npm//@codemirror/lang-javascript",
@@ -71,6 +72,7 @@
"@plugins_npm//@codemirror/lang-sass",
"@plugins_npm//@codemirror/lang-sql",
"@plugins_npm//@codemirror/lang-xml",
+ "@plugins_npm//@codemirror/lang-yaml",
"@plugins_npm//@codemirror/language",
"@plugins_npm//@codemirror/language-data",
"@plugins_npm//@codemirror/legacy-modes",
diff --git a/web/element/language.ts b/web/element/language.ts
index edeb053..c0dd176 100644
--- a/web/element/language.ts
+++ b/web/element/language.ts
@@ -38,7 +38,6 @@
import {forth} from '@codemirror/legacy-modes/mode/forth';
import {fortran} from '@codemirror/legacy-modes/mode/fortran';
import {gas} from '@codemirror/legacy-modes/mode/gas';
-import {go} from '@codemirror/legacy-modes/mode/go';
import {gherkin} from '@codemirror/legacy-modes/mode/gherkin';
import {groovy} from '@codemirror/legacy-modes/mode/groovy';
import {fSharp, oCaml} from '@codemirror/legacy-modes/mode/mllike';
@@ -103,11 +102,11 @@
import {webIDL} from '@codemirror/legacy-modes/mode/webidl';
import {xQuery} from '@codemirror/legacy-modes/mode/xquery';
import {yacas} from '@codemirror/legacy-modes/mode/yacas';
-import {yaml} from '@codemirror/legacy-modes/mode/yaml';
import {z80} from '@codemirror/legacy-modes/mode/z80';
import {cpp} from '@codemirror/lang-cpp';
import {css} from '@codemirror/lang-css';
+import {go} from '@codemirror/lang-go';
import {html} from '@codemirror/lang-html';
import {java} from '@codemirror/lang-java';
import {javascript} from '@codemirror/lang-javascript';
@@ -120,6 +119,7 @@
import {sass} from '@codemirror/lang-sass';
import {sql} from '@codemirror/lang-sql';
import {xml} from '@codemirror/lang-xml';
+import {yaml} from '@codemirror/lang-yaml';
export const language = (fileType?: string) => {
switch (fileType) {
@@ -171,7 +171,7 @@
case 'text/x-crystal':
return StreamLanguage.define(crystal);
case 'application/xml':
- return xml;
+ return xml();
case 'text/css':
return css();
case 'text/x-less':
@@ -211,6 +211,8 @@
case 'application/x-erb':
case 'text/x-ruby':
return StreamLanguage.define(ruby);
+ case 'text/javascript':
+ return javascript();
case 'text/x-erlang':
return StreamLanguage.define(erlang);
case 'text/jsx':
@@ -231,7 +233,7 @@
case 'text/x-fsharp':
return StreamLanguage.define(fSharp);
case 'text/x-go':
- return StreamLanguage.define(go);
+ return go();
case 'text/x-groovy':
return StreamLanguage.define(groovy);
case 'text/x-haskell':
@@ -359,7 +361,7 @@
case 'application/xquery':
return StreamLanguage.define(xQuery);
case 'text/x-yaml':
- return StreamLanguage.define(yaml);
+ return yaml();
case 'text/x-yacas':
return StreamLanguage.define(yacas);
case 'text/x-z80':