File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 },
1313 "dependencies" : {
1414 "@codemirror/language" : " ^6.11.0" ,
15- "@codemirror/legacy-modes" : " ^6.5.1" ,
1615 "@codemirror/state" : " ^6.5.2" ,
1716 "@codemirror/theme-one-dark" : " ^6.1.2" ,
1817 "@solid-primitives/deep" : " ^0.3.2" ,
1918 "@solidjs/router" : " ^0.15.3" ,
2019 "@tabler/icons-solidjs" : " ^3.31.0" ,
2120 "codemirror" : " ^6.0.1" ,
21+ "lezer-toml" : " ^1.0.0" ,
2222 "solid-js" : " ^1.9.5"
2323 }
2424}
Original file line number Diff line number Diff line change 1+ import { LRLanguage } from "@codemirror/language" ;
2+ import { parser } from "lezer-toml" ;
3+
4+ export const tomlHighlighting = LRLanguage . define ( {
5+ parser,
6+ languageData : {
7+ commentTokens : { line : "#" }
8+ }
9+ } ) ;
Original file line number Diff line number Diff line change 1- import { StreamLanguage } from "@codemirror/language" ;
2- import { toml } from "@codemirror/legacy-modes/mode/toml" ;
31import { oneDark } from "@codemirror/theme-one-dark" ;
4- import { minimalSetup } from "codemirror" ;
2+ import { basicSetup } from "codemirror" ;
3+ import { tomlHighlighting as tomlLanguage } from "../codemirror/toml" ;
54import { CodeMirror } from "../component/common/CodeMirror" ;
65import { LoginGate } from "../component/LoginGate" ;
76
@@ -21,7 +20,7 @@ reply = true
2120groups_command = true
2221help_command = true
2322 ` ;
24- const extensions = [ minimalSetup , oneDark , StreamLanguage . define ( toml ) ] ;
23+ const extensions = [ basicSetup , oneDark , tomlLanguage ] ;
2524 return (
2625 < div >
2726 < CodeMirror value = { config } extensions = { extensions } />
You can’t perform that action at this time.
0 commit comments