@@ -19,10 +19,12 @@ import { wast } from '@codemirror/lang-wast';
19
19
import { xml } from '@codemirror/lang-xml' ;
20
20
import { yaml } from '@codemirror/lang-yaml' ;
21
21
import { HighlightStyle , StreamLanguage } from '@codemirror/language' ;
22
+ import { kotlin } from '@codemirror/legacy-modes/mode/clike' ;
22
23
import { commonLisp } from '@codemirror/legacy-modes/mode/commonlisp' ;
23
24
import { dockerFile } from '@codemirror/legacy-modes/mode/dockerfile' ;
24
25
import { jinja2 } from '@codemirror/legacy-modes/mode/jinja2' ;
25
26
import { lua } from '@codemirror/legacy-modes/mode/lua' ;
27
+ import { protobuf } from '@codemirror/legacy-modes/mode/protobuf' ;
26
28
import { ruby } from '@codemirror/legacy-modes/mode/ruby' ;
27
29
import { shell } from '@codemirror/legacy-modes/mode/shell' ;
28
30
import { swift } from '@codemirror/legacy-modes/mode/swift' ;
@@ -142,8 +144,9 @@ export function parserFromFilename(filename: string): Parser | null {
142
144
case 'java' :
143
145
return java ( ) . language . parser ;
144
146
145
- // case 'text/x-kotlin':
146
- // return new LanguageSupport(await CodeMirror.kotlin());
147
+ case 'kt' :
148
+ case 'kts' :
149
+ return StreamLanguage . define ( kotlin ) . parser ;
147
150
148
151
case 'json' :
149
152
return json ( ) . language . parser ;
@@ -163,6 +166,9 @@ export function parserFromFilename(filename: string): Parser | null {
163
166
case 'python' :
164
167
return python ( ) . language . parser ;
165
168
169
+ case 'proto' :
170
+ return StreamLanguage . define ( protobuf ) . parser ;
171
+
166
172
case 'md' :
167
173
return markdown ( ) . language . parser ;
168
174
0 commit comments