Skip to content

Commit 802aba9

Browse files
committed
Fix completion type
1 parent 4d8b57c commit 802aba9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/complete.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import { completeFromList, ifNotIn } from "@codemirror/autocomplete";
22
import { atoms, keywords, types } from "./keywords";
33

4+
type CompletionType = "class" | "constant" | "enum" |
5+
"function" | "interface" | "keyword" | "method" | "namespace" |
6+
"property" | "text" | "type" | "variable";
7+
48
export function csharpCompletion() {
5-
function map(type: string) {
9+
function map(type: CompletionType) {
610
return (label: string) => { return { label, type }; }
711
}
812
return ifNotIn([
@@ -12,5 +16,5 @@ export function csharpCompletion() {
1216
"LineComment", "BlockComment", "DocComment",
1317
"PP_Directive", "ArgumentName", "AttrsNamedArg",
1418
"ConstName", "MethodName", "ParamName", "VarName", "FieldName", "PropertyName"],
15-
completeFromList(keywords.map(map("keywords")).concat(types.map(map("type")), atoms.map(map("constant")))));
19+
completeFromList(keywords.map(map("keyword")).concat(types.map(map("type")), atoms.map(map("constant")))));
1620
}

0 commit comments

Comments
 (0)