Skip to content

Commit 7bf6057

Browse files
author
Calvinn Ng
committed
add OCaml top level keywords
1 parent 9134e27 commit 7bf6057

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

core/autocomplete/languages.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,32 @@ export const Markdown: AutocompleteLanguageInfo = {
281281
},
282282
};
283283

284+
export const OCaml: AutocompleteLanguageInfo = {
285+
topLevelKeywords: [
286+
"let",
287+
"type",
288+
"module",
289+
"open",
290+
"if",
291+
"then",
292+
"else",
293+
"match",
294+
"with",
295+
"fun",
296+
"val",
297+
"exception",
298+
"rec",
299+
"struct",
300+
"sig",
301+
"end",
302+
],
303+
singleLineComment: "(* *)",
304+
endOfLine: [";"],
305+
stopWords: [],
306+
lineFilters: [],
307+
useMultiline: undefined,
308+
};
309+
284310
export const LANGUAGES: { [extension: string]: AutocompleteLanguageInfo } = {
285311
ts: Typescript,
286312
js: Typescript,
@@ -321,4 +347,6 @@ export const LANGUAGES: { [extension: string]: AutocompleteLanguageInfo } = {
321347
yaml: YAML,
322348
yml: YAML,
323349
md: Markdown,
350+
ml: OCaml,
351+
mli: OCaml
324352
};

0 commit comments

Comments
 (0)