Skip to content

Commit 881325b

Browse files
committed
fix sandbox
1 parent 70112d9 commit 881325b

File tree

3 files changed

+13
-38
lines changed

3 files changed

+13
-38
lines changed

apps/sandbox/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
"@codemirror/language-data": "^6.1.0",
2727
"@codemirror/legacy-modes": "^6.1.0",
2828
"@codemirror/search": "^6.0.0",
29+
"@codemirror/lint": "^6.0.0",
30+
"@codemirror/autocomplete": "^6.0.0",
31+
"@lezer/lezer": "^1.0.0",
32+
"@lezer/common": "^1.0.0",
33+
"@lezer/markdown": "^1.0.0",
34+
"@lezer/highlight": "^1.0.0",
2935
"@codemirror/state": "^6.0.0",
3036
"@codemirror/view": "^6.0.0",
3137
"@content-ui/input": "^0.2.1",
@@ -64,7 +70,7 @@
6470
"vite": "^4.5.14"
6571
},
6672
"scripts": {
67-
"start": "tsc && cross-env NODE_ENV=development vite",
73+
"start": "cross-env NODE_ENV=development vite",
6874
"build": "tsc && cross-env NODE_ENV=production vite build"
6975
}
7076
}

apps/sandbox/src/components/CustomCodeMirror.tsx

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ import { json } from '@codemirror/lang-json'
2323
import { javascript } from '@codemirror/lang-javascript'
2424
import { html } from '@codemirror/lang-html'
2525
import { css } from '@codemirror/lang-css'
26-
import { python } from '@codemirror/lang-python'
27-
import { wast } from '@codemirror/lang-wast'
28-
import { rust } from '@codemirror/lang-rust'
29-
import { xml } from '@codemirror/lang-xml'
30-
import { php } from '@codemirror/lang-php'
31-
import { MariaSQL, Cassandra, MySQL, PostgreSQL, MSSQL, StandardSQL, sql } from '@codemirror/lang-sql'
3226
import { markdown, markdownLanguage } from '@codemirror/lang-markdown'
3327
import { languages } from '@codemirror/language-data'
3428
import { lezer } from '@codemirror/lang-lezer'
@@ -105,11 +99,6 @@ export const getHighlight = (lang: string | undefined): Extension | undefined =>
10599
case 'twig':
106100
case 'html':
107101
return html()
108-
case 'rss':
109-
case 'wsl':
110-
case 'xsd':
111-
case 'xml':
112-
return xml()
113102
case 'bash':
114103
case 'sh':
115104
case 'zsh':
@@ -132,32 +121,6 @@ export const getHighlight = (lang: string | undefined): Extension | undefined =>
132121
return StreamLanguage.define(yaml)
133122
case 'css':
134123
return css()
135-
case 'python':
136-
return python()
137-
case 'wast':
138-
return wast()
139-
case 'rust':
140-
return rust()
141-
case 'injectablephp':
142-
case 'php':
143-
return php()
144-
case 'mysql':
145-
return sql({dialect: MySQL})
146-
case 'ms sql':
147-
case 'mssql':
148-
return sql({dialect: MSSQL})
149-
case 'mariasql':
150-
return sql({dialect: MariaSQL})
151-
case 'postgresql':
152-
return sql({dialect: PostgreSQL})
153-
case 'cassandra':
154-
case 'cql':
155-
return sql({dialect: Cassandra})
156-
case 'bigquery':
157-
case 'standardsql':
158-
return sql({dialect: StandardSQL})
159-
case 'sql':
160-
return sql()
161124
case 'md':
162125
case 'markdown':
163126
return mdLang

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)