Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Commit c0962a6

Browse files
committed
Support Spec v3.4.0.
1 parent 80cceeb commit c0962a6

10 files changed

Lines changed: 240 additions & 12 deletions

LanguageServer/Parameters/General/CompletionCapabilities.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@
33
/// <summary>
44
/// For <c>initialize</c>
55
/// </summary>
6-
/// <seealso>Spec 3.3.0</seealso>
6+
/// <seealso>Spec 3.4.0</seealso>
77
public class CompletionCapabilities : RegistrationCapabilities
88
{
99
/// <summary>
1010
/// The client supports the following <c>CompletionItem</c> specific capabilities.
1111
/// </summary>
1212
public CompletionItemCapabilities completionItem { get; set; }
1313

14+
/// <summary>
15+
/// The completion item kind values the client supports.
16+
/// </summary>
17+
/// <seealso>Spec 3.4.0</seealso>
18+
public CompletionItemKindCapabilities completionItemKind { get; set; }
19+
1420
/// <summary>
1521
/// The client supports to send additional context information for a
1622
/// <c>textDocument/completion</c> request.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using LanguageServer.Parameters.TextDocument;
2+
3+
namespace LanguageServer.Parameters.General
4+
{
5+
/// <summary>
6+
/// For <c>initialize</c>
7+
/// </summary>
8+
/// <seealso>Spec 3.4.0</seealso>
9+
public class CompletionItemKindCapabilities
10+
{
11+
/// <summary>
12+
/// The completion item kind values the client supports.
13+
/// </summary>
14+
/// <remarks>
15+
/// <para>
16+
/// When this
17+
/// property exists the client also guarantees that it will
18+
/// handle values outside its set gracefully and falls back
19+
/// to a default value when unknown.
20+
/// </para>
21+
/// <para>
22+
/// If this property is not present the client only supports
23+
/// the completion items kinds from <c>Text</c> to <c>Reference</c> as defined in
24+
/// the initial version of the protocol.
25+
/// </para>
26+
/// </remarks>
27+
/// <seealso>Spec 3.4.0</seealso>
28+
public CompletionItemKind[] valueSet { get; set; }
29+
}
30+
}

LanguageServer/Parameters/General/Options.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace LanguageServer.Parameters.General
66
{
77
/// <summary>
8-
/// For <c>Initialize</c>
8+
/// For <c>initialize</c>
99
/// </summary>
1010
/// <remarks>
1111
/// a detailed structure defining each notification.
@@ -35,7 +35,7 @@ public class TextDocumentSyncOptions
3535
}
3636

3737
/// <summary>
38-
/// For <c>Initialize</c>
38+
/// For <c>initialize</c>
3939
/// </summary>
4040
/// <remarks>
4141
/// Save options.
@@ -49,7 +49,7 @@ public class SaveOptions
4949
}
5050

5151
/// <summary>
52-
/// For <c>Initialize</c>
52+
/// For <c>initialize</c>
5353
/// </summary>
5454
/// <remarks>
5555
/// Completion options.
@@ -68,7 +68,7 @@ public class CompletionOptions
6868
}
6969

7070
/// <summary>
71-
/// For <c>Initialize</c>
71+
/// For <c>initialize</c>
7272
/// </summary>
7373
/// <remarks>
7474
/// Signature help options.
@@ -82,7 +82,7 @@ public class SignatureHelpOptions
8282
}
8383

8484
/// <summary>
85-
/// For <c>Initialize</c>
85+
/// For <c>initialize</c>
8686
/// </summary>
8787
/// <remarks>
8888
/// Code Lens options.
@@ -96,7 +96,7 @@ public class CodeLensOptions
9696
}
9797

9898
/// <summary>
99-
/// For <c>Initialize</c>
99+
/// For <c>initialize</c>
100100
/// </summary>
101101
/// <remarks>
102102
/// Format document on type options.
@@ -115,7 +115,7 @@ public class DocumentOnTypeFormattingOptions
115115
}
116116

117117
/// <summary>
118-
/// For <c>Initialize</c>
118+
/// For <c>initialize</c>
119119
/// </summary>
120120
/// <remarks>
121121
/// Document link options.
@@ -129,7 +129,7 @@ public class DocumentLinkOptions
129129
}
130130

131131
/// <summary>
132-
/// For <c>Initialize</c>
132+
/// For <c>initialize</c>
133133
/// </summary>
134134
/// <remarks>
135135
/// Execute command options.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace LanguageServer.Parameters.General
2+
{
3+
/// <summary>
4+
/// For <c>initialize</c>
5+
/// </summary>
6+
/// <remarks>
7+
/// Capabilities specific to the <c>workspace/symbol</c> request.
8+
/// </remarks>
9+
/// <seealso>Spec 3.4.0</seealso>
10+
public class SymbolCapabilities : RegistrationCapabilities
11+
{
12+
/// <summary>
13+
/// Specific capabilities for the <c>SymbolKind</c> in the <c>workspace/symbol</c> request.
14+
/// </summary>
15+
/// <seealso>Spec 3.4.0</seealso>
16+
public SymbolKindCapabilities symbolKind { get; set; }
17+
}
18+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
namespace LanguageServer.Parameters.General
2+
{
3+
/// <summary>
4+
/// For <c>initialize</c>
5+
/// </summary>
6+
/// <remarks>
7+
/// Specific capabilities for the <c>SymbolKind</c> in the <c>workspace/symbol</c> request.
8+
/// </remarks>
9+
/// <seealso>Spec 3.4.0</seealso>
10+
public class SymbolKindCapabilities
11+
{
12+
/// <summary>
13+
/// The symbol kind values the client supports.
14+
/// </summary>
15+
/// <remarks>
16+
/// <para>
17+
/// When this property exists the client also guarantees that it will
18+
/// handle values outside its set gracefully and falls back
19+
/// to a default value when unknown.
20+
/// </para>
21+
/// <para>
22+
/// If this property is not present the client only supports
23+
/// the symbol kinds from <c>File</c> to <c>Array</c> as defined in
24+
/// the initial version of the protocol.
25+
/// </para>
26+
/// </remarks>
27+
/// <seealso>Spec 3.4.0</seealso>
28+
public SymbolKind[] valueSet { get; set; }
29+
}
30+
}

LanguageServer/Parameters/General/TextDocumentClientCapabilities.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/// <summary>
44
/// For <c>initialize</c>
55
/// </summary>
6-
/// <seealso>Spec 3.3.0</seealso>
6+
/// <seealso>Spec 3.4.0</seealso>
77
public class TextDocumentClientCapabilities
88
{
99
/// <summary>
@@ -42,7 +42,8 @@ public class TextDocumentClientCapabilities
4242
/// <summary>
4343
/// Capabilities specific to the <c>textDocument/documentSymbol</c>
4444
/// </summary>
45-
public RegistrationCapabilities documentSymbol { get; set; }
45+
/// <seealso>Spec 3.4.0</seealso>
46+
public SymbolCapabilities documentSymbol { get; set; }
4647

4748
/// <summary>
4849
/// Capabilities specific to the <c>textDocument/formatting</c>

LanguageServer/Parameters/General/WorkspaceClientCapabilities.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// <summary>
44
/// For <c>initialize</c>
55
/// </summary>
6+
/// <seealso>Spec 3.4.0</seealso>
67
public class WorkspaceClientCapabilities
78
{
89
/// <summary>
@@ -29,7 +30,8 @@ public class WorkspaceClientCapabilities
2930
/// <summary>
3031
/// Capabilities specific to the <c>workspace/symbol</c> request.
3132
/// </summary>
32-
public RegistrationCapabilities symbol { get; set; }
33+
/// <seealso>Spec 3.4.0</seealso>
34+
public SymbolCapabilities symbol { get; set; }
3335

3436
/// <summary>
3537
/// Capabilities specific to the <c>workspace/executeCommand</c> request.

LanguageServer/Parameters/SymbolKind.cs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,93 @@ namespace LanguageServer.Parameters
1010
/// <remarks>
1111
/// A symbol kind.
1212
/// </remarks>
13+
/// <seealso>Spec 3.4.0</seealso>
1314
public enum SymbolKind
1415
{
16+
/// <summary>File</summary>
1517
File = 1,
18+
19+
/// <summary>Module</summary>
1620
Module = 2,
21+
22+
/// <summary>Namespace</summary>
1723
Namespace = 3,
24+
25+
/// <summary>Package</summary>
1826
Package = 4,
27+
28+
/// <summary>Class</summary>
1929
Class = 5,
30+
31+
/// <summary>Method</summary>
2032
Method = 6,
33+
34+
/// <summary>Property</summary>
2135
Property = 7,
36+
37+
/// <summary>Field</summary>
2238
Field = 8,
39+
40+
/// <summary>Constructor</summary>
2341
Constructor = 9,
42+
43+
/// <summary>Enum</summary>
2444
Enum = 10,
45+
46+
/// <summary>Interface</summary>
2547
Interface = 11,
48+
49+
/// <summary>Function</summary>
2650
Function = 12,
51+
52+
/// <summary>Variable</summary>
2753
Variable = 13,
54+
55+
/// <summary>Constant</summary>
2856
Constant = 14,
57+
58+
/// <summary>String</summary>
2959
String = 15,
60+
61+
/// <summary>Number</summary>
3062
Number = 16,
63+
64+
/// <summary>Boolean</summary>
3165
Boolean = 17,
66+
67+
/// <summary>Array</summary>
3268
Array = 18,
69+
70+
/// <summary>Object</summary>
71+
/// <seealso>Spec 3.4.0</seealso>
72+
Object = 19,
73+
74+
/// <summary>Key</summary>
75+
/// <seealso>Spec 3.4.0</seealso>
76+
Key = 20,
77+
78+
/// <summary>Null</summary>
79+
/// <seealso>Spec 3.4.0</seealso>
80+
Null = 21,
81+
82+
/// <summary>EnumMember</summary>
83+
/// <seealso>Spec 3.4.0</seealso>
84+
EnumMember = 22,
85+
86+
/// <summary>Struct</summary>
87+
/// <seealso>Spec 3.4.0</seealso>
88+
Struct = 23,
89+
90+
/// <summary>Event</summary>
91+
/// <seealso>Spec 3.4.0</seealso>
92+
Event = 24,
93+
94+
/// <summary>Operator</summary>
95+
/// <seealso>Spec 3.4.0</seealso>
96+
Operator = 25,
97+
98+
/// <summary>TypeParameter</summary>
99+
/// <seealso>Spec 3.4.0</seealso>
100+
TypeParameter = 26,
33101
}
34102
}

LanguageServer/Parameters/TextDocument/CompletionContext.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ namespace LanguageServer.Parameters.TextDocument
77
/// <summary>
88
/// For <c>textDocument/completion</c>
99
/// </summary>
10+
/// <remarks>
11+
/// Contains additional information about the context in which a completion request is triggered.
12+
/// </remarks>
1013
/// <seealso>Spec 3.3.0</seealso>
1114
public class CompletionContext
1215
{

0 commit comments

Comments
 (0)