Revert "Use json from legacy-modes"
This reverts commit 1f3978dd6b038ca07f5514d23689ede3edc94403.
The reason why under the moder lang-json that it didn't highlight as
well, was because the default theme doesn't highlight everything.
For example it doesn't highlight propertyName.
We have to create our own theme that highlights it.
Change-Id: I4899f5199484d22c317a2e238b132a307e01548b
diff --git a/web/element/language.ts b/web/element/language.ts
index ba76215..d26b034 100644
--- a/web/element/language.ts
+++ b/web/element/language.ts
@@ -46,7 +46,6 @@
import {http} from '@codemirror/legacy-modes/mode/http';
import {idl} from '@codemirror/legacy-modes/mode/idl';
import {jinja2} from '@codemirror/legacy-modes/mode/jinja2';
-import {json} from '@codemirror/legacy-modes/mode/javascript';
import {jsonld} from '@codemirror/legacy-modes/mode/javascript';
import {julia} from '@codemirror/legacy-modes/mode/julia';
import {kotlin} from '@codemirror/legacy-modes/mode/clike';
@@ -111,6 +110,7 @@
import {html} from '@codemirror/lang-html';
import {java} from '@codemirror/lang-java';
import {javascript} from '@codemirror/lang-javascript';
+import {json} from '@codemirror/lang-json';
import {less} from '@codemirror/lang-less';
import {markdown} from '@codemirror/lang-markdown';
import {php} from '@codemirror/lang-php';
@@ -161,7 +161,7 @@
case 'text/x-cmake':
return StreamLanguage.define(cmake);
case 'application/json':
- return StreamLanguage.define(json);
+ return json();
case 'text/x-cobol':
return StreamLanguage.define(cobol);
case 'text/x-coffeescript':