1
1
import type { LineFilter } from "./lineStream" ;
2
2
3
3
export interface AutocompleteLanguageInfo {
4
+ name : string ;
4
5
topLevelKeywords : string [ ] ;
5
6
singleLineComment : string ;
6
7
endOfLine : string [ ] ;
@@ -14,13 +15,15 @@ export interface AutocompleteLanguageInfo {
14
15
15
16
// TypeScript
16
17
export const Typescript = {
18
+ name : "TypeScript" ,
17
19
topLevelKeywords : [ "function" , "class" , "module" , "export" , "import" ] ,
18
20
singleLineComment : "//" ,
19
21
endOfLine : [ ";" ] ,
20
22
} ;
21
23
22
24
// Python
23
25
export const Python = {
26
+ name : "Python" ,
24
27
// """"#" is for .ipynb files, where we add '"""' surrounding markdown blocks.
25
28
// This stops the model from trying to complete the start of a new markdown block
26
29
topLevelKeywords : [ "def" , "class" , '"""#' ] ,
@@ -30,55 +33,63 @@ export const Python = {
30
33
31
34
// Java
32
35
export const Java = {
36
+ name : "Java" ,
33
37
topLevelKeywords : [ "class" , "function" ] ,
34
38
singleLineComment : "//" ,
35
39
endOfLine : [ ";" ] ,
36
40
} ;
37
41
38
42
// C++
39
43
export const Cpp = {
44
+ name : "C++" ,
40
45
topLevelKeywords : [ "class" , "namespace" , "template" ] ,
41
46
singleLineComment : "//" ,
42
47
endOfLine : [ ";" ] ,
43
48
} ;
44
49
45
50
// C#
46
51
export const CSharp = {
52
+ name : "C#" ,
47
53
topLevelKeywords : [ "class" , "namespace" , "void" ] ,
48
54
singleLineComment : "//" ,
49
55
endOfLine : [ ";" ] ,
50
56
} ;
51
57
52
58
// C
53
59
export const C = {
60
+ name : "C" ,
54
61
topLevelKeywords : [ "if" , "else" , "while" , "for" , "switch" , "case" ] ,
55
62
singleLineComment : "//" ,
56
63
endOfLine : [ ";" ] ,
57
64
} ;
58
65
59
66
// Scala
60
67
export const Scala = {
68
+ name : "Scala" ,
61
69
topLevelKeywords : [ "def" , "val" , "var" , "class" , "object" , "trait" ] ,
62
70
singleLineComment : "//" ,
63
71
endOfLine : [ ";" ] ,
64
72
} ;
65
73
66
74
// Go
67
75
export const Go = {
76
+ name : "Go" ,
68
77
topLevelKeywords : [ "func" , "package" , "import" , "type" ] ,
69
78
singleLineComment : "//" ,
70
79
endOfLine : [ ] ,
71
80
} ;
72
81
73
82
// Rust
74
83
export const Rust = {
84
+ name : "Rust" ,
75
85
topLevelKeywords : [ "fn" , "mod" , "pub" , "struct" , "enum" , "trait" ] ,
76
86
singleLineComment : "//" ,
77
87
endOfLine : [ ";" ] ,
78
88
} ;
79
89
80
90
// Haskell
81
91
export const Haskell = {
92
+ name : "Haskell" ,
82
93
topLevelKeywords : [
83
94
"data" ,
84
95
"type" ,
@@ -95,48 +106,55 @@ export const Haskell = {
95
106
96
107
// PHP
97
108
export const PHP = {
109
+ name : "PHP" ,
98
110
topLevelKeywords : [ "function" , "class" , "namespace" , "use" ] ,
99
111
singleLineComment : "//" ,
100
112
endOfLine : [ ";" ] ,
101
113
} ;
102
114
103
115
// Ruby on Rails
104
116
export const RubyOnRails = {
117
+ name : "Ruby on Rails" ,
105
118
topLevelKeywords : [ "def" , "class" , "module" ] ,
106
119
singleLineComment : "#" ,
107
120
endOfLine : [ ] ,
108
121
} ;
109
122
110
123
// Swift
111
124
export const Swift = {
125
+ name : "Swift" ,
112
126
topLevelKeywords : [ "func" , "class" , "struct" , "import" ] ,
113
127
singleLineComment : "//" ,
114
128
endOfLine : [ ";" ] ,
115
129
} ;
116
130
117
131
// Kotlin
118
132
export const Kotlin = {
133
+ name : "Kotlin" ,
119
134
topLevelKeywords : [ "fun" , "class" , "package" , "import" ] ,
120
135
singleLineComment : "//" ,
121
136
endOfLine : [ ";" ] ,
122
137
} ;
123
138
124
139
// Ruby
125
140
export const Ruby = {
141
+ name : "Ruby" ,
126
142
topLevelKeywords : [ "class" , "module" , "def" ] ,
127
143
singleLineComment : "#" ,
128
144
endOfLine : [ ] ,
129
145
} ;
130
146
131
147
// Clojure
132
148
export const Clojure = {
149
+ name : "Clojure" ,
133
150
topLevelKeywords : [ "def" , "fn" , "let" , "do" , "if" , "defn" , "ns" , "defmacro" ] ,
134
151
singleLineComment : ";" ,
135
152
endOfLine : [ ] ,
136
153
} ;
137
154
138
155
// Julia
139
156
export const Julia = {
157
+ name : "Julia" ,
140
158
topLevelKeywords : [
141
159
"function" ,
142
160
"macro" ,
@@ -155,6 +173,7 @@ export const Julia = {
155
173
156
174
// F#
157
175
export const FSharp = {
176
+ name : "F#" ,
158
177
topLevelKeywords : [
159
178
"let" ,
160
179
"type" ,
@@ -173,6 +192,7 @@ export const FSharp = {
173
192
174
193
// R
175
194
export const R = {
195
+ name : "R" ,
176
196
topLevelKeywords : [
177
197
"function" ,
178
198
"if" ,
@@ -189,13 +209,15 @@ export const R = {
189
209
190
210
// Dart
191
211
export const Dart = {
212
+ name : "Dart" ,
192
213
topLevelKeywords : [ "class" , "import" , "void" , "enum" ] ,
193
214
singleLineComment : "//" ,
194
215
endOfLine : [ ";" ] ,
195
216
} ;
196
217
197
218
// Solidity
198
219
export const Solidity = {
220
+ name : "Solidity" ,
199
221
topLevelKeywords : [
200
222
"contract" ,
201
223
"event" ,
@@ -218,6 +240,7 @@ export const Solidity = {
218
240
219
241
// YAML
220
242
export const YAML : AutocompleteLanguageInfo = {
243
+ name : "YAML" ,
221
244
topLevelKeywords : [ ] ,
222
245
singleLineComment : "#" ,
223
246
endOfLine : [ ] ,
@@ -258,6 +281,7 @@ export const YAML: AutocompleteLanguageInfo = {
258
281
} ;
259
282
260
283
export const Markdown : AutocompleteLanguageInfo = {
284
+ name : "Markdown" ,
261
285
topLevelKeywords : [ ] ,
262
286
singleLineComment : "" ,
263
287
endOfLine : [ ] ,
0 commit comments