-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to the latest spec changes (#415)
* Updated to the latest spec changes * fixed unit tests * fixed unit tests * moved handler around Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
87b6613
commit b9882e6
Showing
33 changed files
with
352 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
-- This is the last commit we caught up with https://github.com/Microsoft/language-server-protocol/commits/gh-pages | ||
lastSha: a94f201e01fcdc0a308741bf3d46eef1a47fb6b5 | ||
lastSha: 558f1e114a3dc53da7c3686a657ebef070275d63 | ||
|
||
https://github.com/Microsoft/language-server-protocol/compare/a94f201e01fcdc0a308741bf3d46eef1a47fb6b5..gh-pages | ||
https://github.com/Microsoft/language-server-protocol/compare/558f1e114a3dc53da7c3686a657ebef070275d63..gh-pages |
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
24 changes: 24 additions & 0 deletions
24
src/Protocol/Client/Capabilities/CodeLensWorkspaceClientCapabilities.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,24 @@ | ||
using System; | ||
using OmniSharp.Extensions.LanguageServer.Protocol.Serialization; | ||
|
||
namespace OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities | ||
{ | ||
/// <summary> | ||
/// Capabilities specific to the code lens requests scoped to the | ||
/// workspace. | ||
/// | ||
/// @since 3.16.0 - proposed state. | ||
/// </summary> | ||
[Obsolete(Constants.Proposal)] | ||
[CapabilityKey(nameof(ClientCapabilities.TextDocument), nameof(WorkspaceClientCapabilities.CodeLens))] | ||
public class CodeLensWorkspaceClientCapabilities | ||
{ | ||
/// <summary> | ||
/// Whether the client implementation supports a refresh request send from the server | ||
/// to the client. This is useful if a server detects a change which requires a | ||
/// re-calculation of all code lenses. | ||
/// </summary> | ||
[Optional] | ||
public bool RefreshSupport { 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
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
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
21 changes: 21 additions & 0 deletions
21
src/Protocol/Client/Capabilities/ShowMessageRequestClientCapabilities.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,21 @@ | ||
using System; | ||
using OmniSharp.Extensions.LanguageServer.Protocol.Serialization; | ||
|
||
namespace OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities | ||
{ | ||
/// <summary> | ||
/// Capabilities specific to the showMessage request | ||
/// | ||
/// @since 3.16.0 - proposed state | ||
/// </summary> | ||
[Obsolete(Constants.Proposal)] | ||
[CapabilityKey(nameof(ClientCapabilities.Window), nameof(WindowClientCapabilities.ShowMessage))] | ||
public class ShowMessageRequestClientCapabilities | ||
{ | ||
/// <summary> | ||
/// Capabilities specific to the `MessageActionItem` type. | ||
/// </summary> | ||
[Optional] | ||
public ShowMessageRequestMessageActionItemClientCapabilities? MessageActionItem { get; set; } | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Protocol/Client/Capabilities/ShowMessageRequestMessageActionItemClientCapabilities.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; | ||
using OmniSharp.Extensions.LanguageServer.Protocol.Serialization; | ||
|
||
namespace OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities | ||
{ | ||
[Obsolete(Constants.Proposal)] | ||
public class ShowMessageRequestMessageActionItemClientCapabilities | ||
{ | ||
/// <summary> | ||
/// Whether the client supports additional attribues which | ||
/// are preserved and send back to the server in the | ||
/// request's response. | ||
/// </summary> | ||
[Optional] | ||
public bool AdditionalPropertiesSupport { 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
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
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
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
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
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
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
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,33 @@ | ||
using System.Diagnostics; | ||
|
||
namespace OmniSharp.Extensions.LanguageServer.Protocol.Models | ||
{ | ||
/// <summary> | ||
/// A special text edit to provide an insert and a replace operation. | ||
/// | ||
/// @since 3.16.0 - proposed state | ||
/// </summary> | ||
[DebuggerDisplay("{" + nameof(DebuggerDisplay) + ",nq}")] | ||
public class InsertReplaceEdit | ||
{ | ||
/// <summary> | ||
/// The string to be inserted. | ||
/// </summary> | ||
public string NewText { get; set; } | ||
|
||
/// <summary> | ||
/// The range if the insert is requested | ||
/// </summary> | ||
public Range Insert { get; set; } | ||
|
||
/// <summary> | ||
/// The range if the replace is requested. | ||
/// </summary> | ||
public Range Replace { get; set; } | ||
|
||
private string DebuggerDisplay => $"{Insert} / {Replace} {( string.IsNullOrWhiteSpace(NewText) ? string.Empty : NewText.Length > 30 ? NewText.Substring(0, 30) : NewText )}"; | ||
|
||
/// <inheritdoc /> | ||
public override string ToString() => DebuggerDisplay; | ||
} | ||
} |
Oops, something went wrong.