Skip to content

Commit a203bb4

Browse files
Kapil Borledaviwil
authored andcommitted
Add TextDocumentClientCapabilities type
1 parent f99e353 commit a203bb4

1 file changed

Lines changed: 130 additions & 0 deletions

File tree

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
2+
{
3+
public class TextDocumentClientCapabilities
4+
{
5+
/// <summary>
6+
/// Synchronization capabilities the client supports.
7+
/// </summary>
8+
public SynchronizationCapabilities Synchronization { get; set; }
9+
10+
/// <summary>
11+
/// Capabilities specific to `textDocument/completion`.
12+
/// </summary>
13+
public CompletionCapabilities Completion { get; set; }
14+
15+
/// <summary>
16+
/// Capabilities specific to the `textDocument/hover`.
17+
/// </summary>
18+
public DynamicRegistrationCapability Hover { get; set; }
19+
20+
/// <summary>
21+
/// Capabilities specific to the `textDocument/signatureHelp`.
22+
/// </summary>
23+
public DynamicRegistrationCapability SignatureHelp { get; set; }
24+
25+
/// <summary>
26+
/// Capabilities specific to the `textDocument/references`.
27+
/// </summary>
28+
public DynamicRegistrationCapability References { get; set; }
29+
30+
/// <summary>
31+
/// Capabilities specific to the `textDocument/documentHighlight`.
32+
/// </summary>
33+
public DynamicRegistrationCapability DocumentHighlight { get; set; }
34+
35+
/// <summary>
36+
/// Capabilities specific to the `textDocument/documentSymbol`.
37+
/// </summary>
38+
public DynamicRegistrationCapability DocumentSymbol { get; set; }
39+
40+
/// <summary>
41+
/// Capabilities specific to the `textDocument/formatting`.
42+
/// </summary>
43+
public DynamicRegistrationCapability Formatting { get; set; }
44+
45+
/// <summary>
46+
/// Capabilities specific to the `textDocument/rangeFormatting`.
47+
/// </summary>
48+
public DynamicRegistrationCapability RangeFormatting { get; set; }
49+
50+
/// <summary>
51+
/// Capabilities specific to the `textDocument/onTypeFormatting`.
52+
/// </summary>
53+
public DynamicRegistrationCapability OnTypeFormatting { get; set; }
54+
55+
/// <summary>
56+
/// Capabilities specific to the `textDocument/definition`.
57+
/// </summary>
58+
public DynamicRegistrationCapability Definition { get; set; }
59+
60+
/// <summary>
61+
/// Capabilities specific to the `textDocument/codeAction`.
62+
/// </summary>
63+
public DynamicRegistrationCapability CodeAction { get; set; }
64+
65+
/// <summary>
66+
/// Capabilities specific to the `textDocument/codeLens`.
67+
/// </summary>
68+
public DynamicRegistrationCapability CodeLens { get; set; }
69+
70+
/// <summary>
71+
/// Capabilities specific to the `textDocument/documentLink`.
72+
/// </summary>
73+
public DynamicRegistrationCapability DocumentLink { get; set; }
74+
75+
/// <summary>
76+
/// Capabilities specific to the `textDocument/rename`.
77+
/// </summary>
78+
public DynamicRegistrationCapability Rename { get; set; }
79+
}
80+
81+
/// <summary>
82+
/// Class to represent capabilities specific to `textDocument/completion`.
83+
/// </summary>
84+
public class CompletionCapabilities : DynamicRegistrationCapability
85+
{
86+
/// <summary>
87+
/// The client supports the following `CompletionItem` specific capabilities.
88+
/// </summary>
89+
/// <returns></returns>
90+
CompletionItemCapabilities CompletionItem { get; set; }
91+
}
92+
93+
/// <summary>
94+
/// Class to represent capabilities specific to `CompletionItem`.
95+
/// </summary>
96+
public class CompletionItemCapabilities
97+
{
98+
/// <summary>
99+
/// Client supports snippets as insert text.
100+
///
101+
/// A snippet can define tab stops and placeholders with `$1`, `$2`
102+
/// and `${3:foo}`. `$0` defines the final tab stop, it defaults to
103+
/// the end of the snippet. Placeholders with equal identifiers are linked,
104+
/// that is typing in one will update others too.
105+
/// </summary>
106+
bool SnippetSupport { get; set; }
107+
}
108+
109+
/// <summary>
110+
/// Class to represent synchronization capabilities the client supports.
111+
/// </summary>
112+
public class SynchronizationCapabilities : DynamicRegistrationCapability
113+
{
114+
/// <summary>
115+
/// The client supports sending will save notifications.
116+
/// </summary>
117+
bool WillSave { get; set; }
118+
119+
/// <summary>
120+
/// The client supports sending a will save request and waits for a response
121+
/// providing text edits which will be applied to the document before it is save.
122+
/// </summary>
123+
bool WillSaveWaitUntil { get; set; }
124+
125+
/// <summary>
126+
/// The client supports did save notifications.
127+
/// </summary>
128+
bool DidSave { get; set; }
129+
}
130+
}

0 commit comments

Comments
 (0)