-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74068 from dibarbet/add_lsp_types
Add some missing LSP protocol definitions
- Loading branch information
Showing
10 changed files
with
241 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/LanguageServer/Protocol/Protocol/CodeActionRegistrationOptions.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,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Roslyn.LanguageServer.Protocol; | ||
|
||
/// <summary> | ||
/// Class representing the registration options for code action support. | ||
/// | ||
/// See the <see href="https://microsoft.github.io/language-server-protocol/specifications/specification-current/#codeActionRegistrationOptions">Language Server Protocol specification</see> for additional information. | ||
/// </summary> | ||
internal class CodeActionRegistrationOptions : CodeActionOptions, ITextDocumentRegistrationOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the document filters for this registration option. | ||
/// </summary> | ||
[JsonPropertyName("documentSelector")] | ||
public DocumentFilter[]? DocumentSelector | ||
{ | ||
get; | ||
set; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/LanguageServer/Protocol/Protocol/CompletionRegistrationOptions.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,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Roslyn.LanguageServer.Protocol; | ||
|
||
/// <summary> | ||
/// Class representing the registration options for completion support. | ||
/// | ||
/// See the <see href="https://microsoft.github.io/language-server-protocol/specifications/specification-current/#completionRegistrationOptions">Language Server Protocol specification</see> for additional information. | ||
/// </summary> | ||
internal class CompletionRegistrationOptions : CompletionOptions, ITextDocumentRegistrationOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the document filters for this registration option. | ||
/// </summary> | ||
[JsonPropertyName("documentSelector")] | ||
public DocumentFilter[]? DocumentSelector | ||
{ | ||
get; | ||
set; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/LanguageServer/Protocol/Protocol/DefinitionRegistrationOptions.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,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Roslyn.LanguageServer.Protocol; | ||
|
||
/// <summary> | ||
/// Class representing the registration options for go to definition support. | ||
/// | ||
/// See the <see href="https://microsoft.github.io/language-server-protocol/specifications/specification-current/#definitionRegistrationOptions">Language Server Protocol specification</see> for additional information. | ||
/// </summary> | ||
internal class DefinitionRegistrationOptions : DefinitionOptions, ITextDocumentRegistrationOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the document filters for this registration option. | ||
/// </summary> | ||
[JsonPropertyName("documentSelector")] | ||
public DocumentFilter[]? DocumentSelector | ||
{ | ||
get; | ||
set; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/LanguageServer/Protocol/Protocol/DocumentFormattingRegistrationOptions.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,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Roslyn.LanguageServer.Protocol; | ||
|
||
/// <summary> | ||
/// Class representing the registration options for document formatting support. | ||
/// | ||
/// See the <see href="https://microsoft.github.io/language-server-protocol/specifications/specification-current/#documentFormattingRegistrationOptions">Language Server Protocol specification</see> for additional information. | ||
/// </summary> | ||
internal class DocumentFormattingRegistrationOptions : DocumentFormattingOptions, ITextDocumentRegistrationOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the document filters for this registration option. | ||
/// </summary> | ||
[JsonPropertyName("documentSelector")] | ||
public DocumentFilter[]? DocumentSelector | ||
{ | ||
get; | ||
set; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/LanguageServer/Protocol/Protocol/DocumentOnTypeFormattingRegistrationOptions.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,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Roslyn.LanguageServer.Protocol; | ||
|
||
/// <summary> | ||
/// Class representing the registration options for document on type formatting support. | ||
/// | ||
/// See the <see href="https://microsoft.github.io/language-server-protocol/specifications/specification-current/#documentOnTypeFormattingRegistrationOptions">Language Server Protocol specification</see> for additional information. | ||
/// </summary> | ||
internal class DocumentOnTypeFormattingRegistrationOptions : DocumentOnTypeFormattingOptions, ITextDocumentRegistrationOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the document filters for this registration option. | ||
/// </summary> | ||
[JsonPropertyName("documentSelector")] | ||
public DocumentFilter[]? DocumentSelector | ||
{ | ||
get; | ||
set; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/LanguageServer/Protocol/Protocol/DocumentRangeFormattingRegistrationOptions.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,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Roslyn.LanguageServer.Protocol; | ||
|
||
/// <summary> | ||
/// Class representing the registration options for document range formatting support. | ||
/// | ||
/// See the <see href="https://microsoft.github.io/language-server-protocol/specifications/specification-current/#documentRangeFormattingRegistrationOptions">Language Server Protocol specification</see> for additional information. | ||
/// </summary> | ||
internal class DocumentRangeFormattingRegistrationOptions : DocumentRangeFormattingOptions, ITextDocumentRegistrationOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the document filters for this registration option. | ||
/// </summary> | ||
[JsonPropertyName("documentSelector")] | ||
public DocumentFilter[]? DocumentSelector | ||
{ | ||
get; | ||
set; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/LanguageServer/Protocol/Protocol/FoldingRangeRegistrationOptions.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,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Roslyn.LanguageServer.Protocol; | ||
|
||
/// <summary> | ||
/// Class representing the registration options for folding range support. | ||
/// | ||
/// See the <see href="https://microsoft.github.io/language-server-protocol/specifications/specification-current/#foldingRangeRegistrationOptions">Language Server Protocol specification</see> for additional information. | ||
/// </summary> | ||
internal class FoldingRangeRegistrationOptions : FoldingRangeOptions, ITextDocumentRegistrationOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the document filters for this registration option. | ||
/// </summary> | ||
[JsonPropertyName("documentSelector")] | ||
public DocumentFilter[]? DocumentSelector | ||
{ | ||
get; | ||
set; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/LanguageServer/Protocol/Protocol/HoverRegistrationOptions.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,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Roslyn.LanguageServer.Protocol; | ||
|
||
/// <summary> | ||
/// Class representing the registration options for hover support. | ||
/// | ||
/// See the <see href="https://microsoft.github.io/language-server-protocol/specifications/specification-current/#hoverRegistrationOptions">Language Server Protocol specification</see> for additional information. | ||
/// </summary> | ||
internal class HoverRegistrationOptions : HoverOptions, ITextDocumentRegistrationOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the document filters for this registration option. | ||
/// </summary> | ||
[JsonPropertyName("documentSelector")] | ||
public DocumentFilter[]? DocumentSelector | ||
{ | ||
get; | ||
set; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...ageServer/Protocol/Protocol/Internal/VSInternalDocumentOnAutoInsertRegistrationOptions.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,34 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Roslyn.LanguageServer.Protocol; | ||
|
||
/// <summary> | ||
/// Class representing the registration options for on auto insert support. | ||
/// </summary> | ||
internal class VSInternalDocumentOnAutoInsertRegistrationOptions : VSInternalDocumentOnAutoInsertOptions, ITextDocumentRegistrationOptions, IStaticRegistrationOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the document filters for this registration option. | ||
/// </summary> | ||
[JsonPropertyName("documentSelector")] | ||
public DocumentFilter[]? DocumentSelector | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the id used to register the request. The id can be used to deregister the request again. | ||
/// </summary> | ||
[JsonPropertyName("id")] | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||
public string? Id | ||
{ | ||
get; | ||
set; | ||
} | ||
} |
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