1interface lsp {
2 /// An LSP completion.
3 record completion {
4 label: string,
5 detail: option<string>,
6 kind: option<completion-kind>,
7 insert-text-format: option<insert-text-format>,
8 }
9
10 /// The kind of an LSP completion.
11 variant completion-kind {
12 text,
13 method,
14 function,
15 %constructor,
16 field,
17 variable,
18 class,
19 %interface,
20 module,
21 property,
22 unit,
23 value,
24 %enum,
25 keyword,
26 snippet,
27 color,
28 file,
29 reference,
30 folder,
31 enum-member,
32 constant,
33 struct,
34 event,
35 operator,
36 type-parameter,
37 other(s32),
38 }
39
40 /// Defines how to interpret the insert text in a completion item.
41 variant insert-text-format {
42 plain-text,
43 snippet,
44 other(s32),
45 }
46
47 /// An LSP symbol.
48 record symbol {
49 kind: symbol-kind,
50 name: string,
51 }
52
53 /// The kind of an LSP symbol.
54 variant symbol-kind {
55 file,
56 module,
57 namespace,
58 %package,
59 class,
60 method,
61 property,
62 field,
63 %constructor,
64 %enum,
65 %interface,
66 function,
67 variable,
68 constant,
69 %string,
70 number,
71 boolean,
72 array,
73 object,
74 key,
75 null,
76 enum-member,
77 struct,
78 event,
79 operator,
80 type-parameter,
81 other(s32),
82 }
83}