-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
1,096 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
LanguageServer.Framework/Protocol/Capabilities/Common/SemanticTokensCapabilitiesFull.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Common; | ||
|
||
public class SemanticTokensCapabilitiesFull | ||
{ | ||
/** | ||
* The client will send the `textDocument/semanticTokens/full/delta` request if | ||
* the server provides a corresponding server capability. | ||
*/ | ||
[JsonPropertyName("delta")] | ||
public bool? Delta { get; init; } | ||
} |
18 changes: 18 additions & 0 deletions
18
LanguageServer.Framework/Protocol/Capabilities/Common/SemanticTokensLegend.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Common; | ||
|
||
public class SemanticTokensLegend | ||
{ | ||
/** | ||
* The token types a server uses. | ||
*/ | ||
[JsonPropertyName("tokenTypes")] | ||
public List<string> TokenTypes { get; init; } = []; | ||
|
||
/** | ||
* The token modifiers a server uses. | ||
*/ | ||
[JsonPropertyName("tokenModifiers")] | ||
public List<string> TokenModifiers { get; init; } = []; | ||
} |
3 changes: 3 additions & 0 deletions
3
LanguageServer.Framework/Protocol/Capabilities/Server/Options/CallHierarchyOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class CallHierarchyOptions : WorkDoneProgressOptions; |
80 changes: 80 additions & 0 deletions
80
LanguageServer.Framework/Protocol/Capabilities/Server/Options/CodeActionOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
using System.Text.Json.Serialization; | ||
using EmmyLua.LanguageServer.Framework.Protocol.Model; | ||
using EmmyLua.LanguageServer.Framework.Protocol.Model.Kind; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class CodeActionOptions : WorkDoneProgressOptions | ||
{ | ||
/** | ||
* CodeActionKinds that this server may return. | ||
* | ||
* The list of kinds may be generic, such as `CodeActionKind.Refactor`, | ||
* or the server may list out every specific kind they provide. | ||
*/ | ||
[JsonPropertyName("codeActionKinds")] | ||
public List<CodeActionKind> CodeActionKinds { get; set; } | ||
|
||
/** | ||
* Static documentation for a class of code actions. | ||
* | ||
* Documentation from the provider should be shown in the code actions | ||
* menu if either: | ||
* | ||
* - Code actions of `kind` are requested by the editor. In this case, | ||
* the editor will show the documentation that most closely matches the | ||
* requested code action kind. For example, if a provider has | ||
* documentation for both `Refactor` and `RefactorExtract`, when the | ||
* user requests code actions for `RefactorExtract`, the editor will use | ||
* the documentation for `RefactorExtract` instead of the documentation | ||
* for `Refactor`. | ||
* | ||
* - Any code actions of `kind` are returned by the provider. | ||
* | ||
* At most one documentation entry should be shown per provider. | ||
* | ||
* @since 3.18.0 | ||
* @proposed | ||
*/ | ||
[JsonPropertyName("documentation")] | ||
public List<CodeActionKindDocumentation> Documentation { get; set; } | ||
} | ||
|
||
/** | ||
* Documentation for a class of code actions. | ||
* | ||
* @since 3.18.0 | ||
* @proposed | ||
*/ | ||
public class CodeActionKindDocumentation | ||
{ | ||
/** | ||
* The kind of the code action being documented. | ||
* | ||
* If the kind is generic, such as `CodeActionKind.Refactor`, the | ||
* documentation will be shown whenever any refactorings are returned. If | ||
* the kind is more specific, such as `CodeActionKind.RefactorExtract`, the | ||
* documentation will only be shown when extract refactoring code actions | ||
* are returned. | ||
*/ | ||
[JsonPropertyName("kind")] | ||
public CodeActionKind Kind { get; set; } | ||
|
||
/** | ||
* Command that is used to display the documentation to the user. | ||
* | ||
* The title of this documentation code action is taken | ||
* from {@linkcode Command.title} | ||
*/ | ||
[JsonPropertyName("command")] | ||
public Command Command { get; set; } = null!; | ||
|
||
/** | ||
* The server provides support to resolve additional | ||
* information for a code action. | ||
* | ||
* @since 3.16.0 | ||
*/ | ||
[JsonPropertyName("resolveProvider")] | ||
public bool? ResolveProvider { get; set; } | ||
} |
12 changes: 12 additions & 0 deletions
12
LanguageServer.Framework/Protocol/Capabilities/Server/Options/CodeLensOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class CodeLensOptions : WorkDoneProgressOptions | ||
{ | ||
/** | ||
* Code lens has a resolve provider as well. | ||
*/ | ||
[JsonPropertyName("resolveProvider")] | ||
public bool? ResolveProvider { get; set; } | ||
} |
64 changes: 64 additions & 0 deletions
64
LanguageServer.Framework/Protocol/Capabilities/Server/Options/CompletionOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class CompletionOptions : WorkDoneProgressOptions | ||
{ | ||
/** | ||
* Most tools trigger completion request automatically without explicitly | ||
* requesting it using a keyboard shortcut (e.g., Ctrl+Space). Typically they | ||
* do so when the user starts to type an identifier. For example, if the user | ||
* types `c` in a JavaScript file, code complete will automatically pop up and | ||
* present `console` besides others as a completion item. Characters that | ||
* make up identifiers don't need to be listed here. | ||
* | ||
* If code complete should automatically be triggered on characters not being | ||
* valid inside an identifier (for example, `.` in JavaScript), list them in | ||
* `triggerCharacters`. | ||
*/ | ||
[JsonPropertyName("triggerCharacters")] | ||
public List<string>? TriggerCharacters { get; init; } | ||
|
||
/** | ||
* The list of all possible characters that commit a completion. This field | ||
* can be used if clients don't support individual commit characters per | ||
* completion item. See client capability | ||
* `completion.completionItem.commitCharactersSupport`. | ||
* | ||
* If a server provides both `allCommitCharacters` and commit characters on | ||
* an individual completion item, the ones on the completion item win. | ||
* | ||
* @since 3.2.0 | ||
*/ | ||
[JsonPropertyName("allCommitCharacters")] | ||
public List<string>? AllCommitCharacters { get; init; } | ||
|
||
/** | ||
* The server provides support to resolve additional | ||
* information for a completion item. | ||
*/ | ||
[JsonPropertyName("resolveProvider")] | ||
public bool ResolveProvider { get; init; } | ||
|
||
/** | ||
* The server supports the following `CompletionItem` specific | ||
* capabilities. | ||
* | ||
* @since 3.17.0 | ||
*/ | ||
[JsonPropertyName("completionItem")] | ||
public CompletionItemDetailOptions? CompletionItem { get; init; } | ||
} | ||
|
||
public class CompletionItemDetailOptions | ||
{ | ||
/** | ||
* The server has support for completion item label | ||
* details (see also `CompletionItemLabelDetails`) when receiving | ||
* a completion item in a resolve call. | ||
* | ||
* @since 3.17.0 | ||
*/ | ||
[JsonPropertyName("labelDetailsSupport")] | ||
public bool? LabelDetailsSupport { get; init; } | ||
} |
3 changes: 3 additions & 0 deletions
3
LanguageServer.Framework/Protocol/Capabilities/Server/Options/DeclarationOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class DeclarationOptions : WorkDoneProgressOptions; |
3 changes: 3 additions & 0 deletions
3
LanguageServer.Framework/Protocol/Capabilities/Server/Options/DefinitionOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class DefinitionOptions : WorkDoneProgressOptions; |
28 changes: 28 additions & 0 deletions
28
LanguageServer.Framework/Protocol/Capabilities/Server/Options/DiagnosticOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class DiagnosticOptions : WorkDoneProgressOptions | ||
{ | ||
/** | ||
* An optional identifier under which the diagnostics are | ||
* managed by the client. | ||
*/ | ||
[JsonPropertyName("identifier")] | ||
public string? Identifier { get; set; } | ||
|
||
/** | ||
* Whether the language has inter file dependencies, meaning that | ||
* editing code in one file can result in a different diagnostic | ||
* set in another file. Inter file dependencies are common for | ||
* most programming languages and typically uncommon for linters. | ||
*/ | ||
[JsonPropertyName("interFileDependencies")] | ||
public bool InterFileDependencies { get; set; } | ||
|
||
/** | ||
* The server provides support for workspace diagnostics as well. | ||
*/ | ||
[JsonPropertyName("workspaceDiagnostics")] | ||
public bool WorkspaceDiagnostics { get; set; } | ||
} |
3 changes: 3 additions & 0 deletions
3
LanguageServer.Framework/Protocol/Capabilities/Server/Options/DocumentColorOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class DocumentColorOptions : WorkDoneProgressOptions; |
3 changes: 3 additions & 0 deletions
3
LanguageServer.Framework/Protocol/Capabilities/Server/Options/DocumentFormattingOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class DocumentFormattingOptions : WorkDoneProgressOptions; |
5 changes: 5 additions & 0 deletions
5
LanguageServer.Framework/Protocol/Capabilities/Server/Options/DocumentHighlightOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class DocumentHighlightOptions : WorkDoneProgressOptions; |
12 changes: 12 additions & 0 deletions
12
LanguageServer.Framework/Protocol/Capabilities/Server/Options/DocumentLinkOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class DocumentLinkOptions : WorkDoneProgressOptions | ||
{ | ||
/** | ||
* Document links have a resolve provider as well. | ||
*/ | ||
[JsonPropertyName("resolveProvider")] | ||
public bool? ResolveProvider { get; set; } | ||
} |
17 changes: 17 additions & 0 deletions
17
...eServer.Framework/Protocol/Capabilities/Server/Options/DocumentOnTypeFormattingOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class DocumentOnTypeFormattingOptions | ||
{ | ||
/** | ||
* A character on which formatting should be triggered, like `{`. | ||
*/ | ||
[JsonPropertyName("firstTriggerCharacter")] | ||
public string FirstTriggerCharacter { get; set; } = null!; | ||
|
||
/** | ||
* More trigger characters. | ||
*/ | ||
public List<string>? MoreTriggerCharacter { get; set; } | ||
} |
15 changes: 15 additions & 0 deletions
15
...geServer.Framework/Protocol/Capabilities/Server/Options/DocumentRangeFormattingOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class DocumentRangeFormattingOptions : WorkDoneProgressOptions | ||
{ | ||
/** | ||
* Whether the server supports formatting multiple ranges at once. | ||
* | ||
* @since 3.18.0 | ||
* @proposed | ||
*/ | ||
[JsonPropertyName("rangesSupport")] | ||
public bool? RangesSupport { get; set; } | ||
} |
15 changes: 15 additions & 0 deletions
15
LanguageServer.Framework/Protocol/Capabilities/Server/Options/DocumentSymbolOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class DocumentSymbolOptions : WorkDoneProgressOptions | ||
{ | ||
/** | ||
* A human-readable string that is shown when multiple outlines trees | ||
* are shown for the same document. | ||
* | ||
* @since 3.16.0 | ||
*/ | ||
[JsonPropertyName("label")] | ||
public string? Label { get; set; } | ||
} |
12 changes: 12 additions & 0 deletions
12
LanguageServer.Framework/Protocol/Capabilities/Server/Options/ExecuteCommandOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class ExecuteCommandOptions : WorkDoneProgressOptions | ||
{ | ||
/** | ||
* The commands to be executed on the server. | ||
*/ | ||
[JsonPropertyName("commands")] | ||
public List<string> Commands { get; init; } = []; | ||
} |
18 changes: 18 additions & 0 deletions
18
...Server.Framework/Protocol/Capabilities/Server/Options/FileOperationRegistrationOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Text.Json.Serialization; | ||
using EmmyLua.LanguageServer.Framework.Protocol.Model; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
/** | ||
* The options to register for file operations. | ||
* | ||
* @since 3.16.0 | ||
*/ | ||
public class FileOperationRegistrationOptions | ||
{ | ||
/** | ||
* The actual filters. | ||
*/ | ||
[JsonPropertyName("filters")] | ||
public List<FileOperationFilter> Filters { get; set; } = []; | ||
} |
3 changes: 3 additions & 0 deletions
3
LanguageServer.Framework/Protocol/Capabilities/Server/Options/HoverOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class HoverOptions : WorkDoneProgressOptions; |
3 changes: 3 additions & 0 deletions
3
LanguageServer.Framework/Protocol/Capabilities/Server/Options/ImplementationOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
public class ImplementationOptions : WorkDoneProgressOptions; |
18 changes: 18 additions & 0 deletions
18
LanguageServer.Framework/Protocol/Capabilities/Server/Options/InlayHintsOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Server.Options; | ||
|
||
/** | ||
* Inlay hint options used during static registration. | ||
* | ||
* @since 3.17.0 | ||
*/ | ||
public class InlayHintsOptions : WorkDoneProgressOptions | ||
{ | ||
/** | ||
* The server provides support to resolve additional | ||
* information for an inlay hint item. | ||
*/ | ||
[JsonPropertyName("resolveProvider")] | ||
public bool? ResolveProvider { get; set; } | ||
} |
Oops, something went wrong.