diff --git a/language-server-protocol.sha.txt b/language-server-protocol.sha.txt
index c39b7c4bc..21a91e446 100644
--- a/language-server-protocol.sha.txt
+++ b/language-server-protocol.sha.txt
@@ -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
diff --git a/src/Protocol/Client/Capabilities/ClientCapabilities.cs b/src/Protocol/Client/Capabilities/ClientCapabilities.cs
index 2c6467e80..ead8209bf 100644
--- a/src/Protocol/Client/Capabilities/ClientCapabilities.cs
+++ b/src/Protocol/Client/Capabilities/ClientCapabilities.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
+using OmniSharp.Extensions.LanguageServer.Protocol.Serialization;
namespace OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities
{
@@ -8,16 +9,19 @@ public class ClientCapabilities : CapabilitiesBase
///
/// Workspace specific client capabilities.
///
+ [Optional]
public WorkspaceClientCapabilities? Workspace { get; set; }
///
/// Text document specific client capabilities.
///
+ [Optional]
public TextDocumentClientCapabilities? TextDocument { get; set; }
///
/// Window specific client capabilities.
///
+ [Optional]
public WindowClientCapabilities? Window { get; set; }
///
diff --git a/src/Protocol/Client/Capabilities/CodeLensWorkspaceClientCapabilities.cs b/src/Protocol/Client/Capabilities/CodeLensWorkspaceClientCapabilities.cs
new file mode 100644
index 000000000..cbd582111
--- /dev/null
+++ b/src/Protocol/Client/Capabilities/CodeLensWorkspaceClientCapabilities.cs
@@ -0,0 +1,24 @@
+using System;
+using OmniSharp.Extensions.LanguageServer.Protocol.Serialization;
+
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities
+{
+ ///
+ /// Capabilities specific to the code lens requests scoped to the
+ /// workspace.
+ ///
+ /// @since 3.16.0 - proposed state.
+ ///
+ [Obsolete(Constants.Proposal)]
+ [CapabilityKey(nameof(ClientCapabilities.TextDocument), nameof(WorkspaceClientCapabilities.CodeLens))]
+ public class CodeLensWorkspaceClientCapabilities
+ {
+ ///
+ /// 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.
+ ///
+ [Optional]
+ public bool RefreshSupport { get; set; }
+ }
+}
diff --git a/src/Protocol/Client/Capabilities/CompletionItemCapabilityOptions.cs b/src/Protocol/Client/Capabilities/CompletionItemCapabilityOptions.cs
index 660e18e6d..753029191 100644
--- a/src/Protocol/Client/Capabilities/CompletionItemCapabilityOptions.cs
+++ b/src/Protocol/Client/Capabilities/CompletionItemCapabilityOptions.cs
@@ -79,5 +79,21 @@ public class CompletionItemCapabilityOptions
///
[Optional]
public CompletionItemCapabilityResolveSupportOptions? ResolveSupport { get; set; }
+
+ ///
+ /// The client supports the `insertTextMode` property on
+ /// a completion item to override the whitespace handling mode
+ /// as defined by the client (see `insertTextMode`).
+ ///
+ /// @since 3.16.0 - proposed state
+ ///
+ [Optional]
+ public CompletionItemInsertTextModeSupportCapabilityOptions? InsertTextModeSupport { get; set; }
}
+
+ public class CompletionItemInsertTextModeSupportCapabilityOptions
+ {
+ public Container ValueSet { get; set; }
+ }
+
}
diff --git a/src/Protocol/Client/Capabilities/FoldingRangeCapability.cs b/src/Protocol/Client/Capabilities/FoldingRangeCapability.cs
index 53c0d9a8b..efb133efc 100644
--- a/src/Protocol/Client/Capabilities/FoldingRangeCapability.cs
+++ b/src/Protocol/Client/Capabilities/FoldingRangeCapability.cs
@@ -10,6 +10,9 @@ public class FoldingRangeCapability : DynamicCapability, ConnectedCapability
+ ///
+ /// in the LSP spec
+ ///
[Optional]
public int? RangeLimit { get; set; }
diff --git a/src/Protocol/Client/Capabilities/SemanticTokensCapability.cs b/src/Protocol/Client/Capabilities/SemanticTokensCapability.cs
index f8df69f17..786983c25 100644
--- a/src/Protocol/Client/Capabilities/SemanticTokensCapability.cs
+++ b/src/Protocol/Client/Capabilities/SemanticTokensCapability.cs
@@ -2,6 +2,7 @@
using OmniSharp.Extensions.LanguageServer.Protocol.Document.Proposals;
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
using OmniSharp.Extensions.LanguageServer.Protocol.Models.Proposals;
+using OmniSharp.Extensions.LanguageServer.Protocol.Serialization;
namespace OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities
{
@@ -34,5 +35,17 @@ public class SemanticTokensCapability : DynamicCapability, ConnectedCapability
public Container Formats { get; set; } = null!;
+
+ ///
+ /// Whether the client supports tokens that can overlap each other.
+ ///
+ [Optional]
+ public bool OverlappingTokenSupport { get; set; }
+
+ ///
+ /// Whether the client supports tokens that can span multiple lines.
+ ///
+ [Optional]
+ public bool MultilineTokenSupport { get; set; }
}
}
diff --git a/src/Protocol/Client/Capabilities/ShowMessageRequestClientCapabilities.cs b/src/Protocol/Client/Capabilities/ShowMessageRequestClientCapabilities.cs
new file mode 100644
index 000000000..d2cc42750
--- /dev/null
+++ b/src/Protocol/Client/Capabilities/ShowMessageRequestClientCapabilities.cs
@@ -0,0 +1,21 @@
+using System;
+using OmniSharp.Extensions.LanguageServer.Protocol.Serialization;
+
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities
+{
+ ///
+ /// Capabilities specific to the showMessage request
+ ///
+ /// @since 3.16.0 - proposed state
+ ///
+ [Obsolete(Constants.Proposal)]
+ [CapabilityKey(nameof(ClientCapabilities.Window), nameof(WindowClientCapabilities.ShowMessage))]
+ public class ShowMessageRequestClientCapabilities
+ {
+ ///
+ /// Capabilities specific to the `MessageActionItem` type.
+ ///
+ [Optional]
+ public ShowMessageRequestMessageActionItemClientCapabilities? MessageActionItem { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Protocol/Client/Capabilities/ShowMessageRequestMessageActionItemClientCapabilities.cs b/src/Protocol/Client/Capabilities/ShowMessageRequestMessageActionItemClientCapabilities.cs
new file mode 100644
index 000000000..e35cdf270
--- /dev/null
+++ b/src/Protocol/Client/Capabilities/ShowMessageRequestMessageActionItemClientCapabilities.cs
@@ -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
+ {
+ ///
+ /// Whether the client supports additional attribues which
+ /// are preserved and send back to the server in the
+ /// request's response.
+ ///
+ [Optional]
+ public bool AdditionalPropertiesSupport { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Protocol/Client/Capabilities/WindowClientCapabilities.cs b/src/Protocol/Client/Capabilities/WindowClientCapabilities.cs
index a718e4327..72b4db570 100644
--- a/src/Protocol/Client/Capabilities/WindowClientCapabilities.cs
+++ b/src/Protocol/Client/Capabilities/WindowClientCapabilities.cs
@@ -9,5 +9,12 @@ public class WindowClientCapabilities : CapabilitiesBase
/// Whether client supports handling progress notifications.
///
public Supports WorkDoneProgress { get; set; }
+
+ ///
+ /// Capabilities specific to the showMessage request
+ ///
+ /// @since 3.16.0 - proposed state
+ ///
+ public Supports ShowMessage { get; set; }
}
}
diff --git a/src/Protocol/Client/Capabilities/WorkspaceClientCapabilities.cs b/src/Protocol/Client/Capabilities/WorkspaceClientCapabilities.cs
index 19118f093..e14b110da 100644
--- a/src/Protocol/Client/Capabilities/WorkspaceClientCapabilities.cs
+++ b/src/Protocol/Client/Capabilities/WorkspaceClientCapabilities.cs
@@ -1,3 +1,5 @@
+using System;
+
namespace OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities
{
public class WorkspaceClientCapabilities : CapabilitiesBase
@@ -36,8 +38,18 @@ public class WorkspaceClientCapabilities : CapabilitiesBase
///
/// @since 3.16.0 - proposed state.
///
+ [Obsolete(Constants.Proposal)]
public Supports SemanticTokens { get; set; }
+ ///
+ /// Capabilities specific to the code lens requests scoped to the
+ /// workspace.
+ ///
+ /// @since 3.16.0 - proposed state.
+ ///
+ [Obsolete(Constants.Proposal)]
+ public Supports CodeLens { get; set; }
+
///
/// The client has support for workspace folders.
///
diff --git a/src/Protocol/Client/Capabilities/WorkspaceEditCapability.cs b/src/Protocol/Client/Capabilities/WorkspaceEditCapability.cs
index 789026b6a..ff5876474 100644
--- a/src/Protocol/Client/Capabilities/WorkspaceEditCapability.cs
+++ b/src/Protocol/Client/Capabilities/WorkspaceEditCapability.cs
@@ -25,5 +25,17 @@ public class WorkspaceEditCapability : ICapability
///
[Optional]
public FailureHandlingKind? FailureHandling { get; set; }
+
+ ///
+ /// Whether the client normalizes line endings to the client specific
+ /// setting.
+ /// If set to `true` the client will normalize line ending characters
+ /// in a workspace edit containg to the client specific new line
+ /// character.
+ ///
+ /// @since 3.16.0 - proposed state
+ ///
+ [Optional]
+ public bool NormalizesLineEndings { get; set; }
}
}
diff --git a/src/Protocol/Models/CompletionItem.cs b/src/Protocol/Models/CompletionItem.cs
index e4168ac47..72de1f854 100644
--- a/src/Protocol/Models/CompletionItem.cs
+++ b/src/Protocol/Models/CompletionItem.cs
@@ -93,13 +93,42 @@ public class CompletionItem : ICanBeResolved, IRequest
[Optional]
public InsertTextFormat InsertTextFormat { get; set; }
+ ///
+ /// How whitespace and indentation is handled during completion
+ /// item insertion.
+ ///
+ /// @since 3.16.0 - proposed state
+ ///
+ [Optional]
+ public InsertTextMode InsertTextMode { get; set; }
+
///
/// An edit which is applied to a document when selecting this completion. When an edit is provided the value of
/// `insertText` is ignored.
///
/// *Note:* The range of the edit must be a single line range and it must contain the position at which completion
/// has been requested.
+ ///
+ /// Most editors support two different operation when accepting a completion
+ /// item. One is to insert a completion text and the other is to replace an
+ /// existing text with a competion text. Since this can usually not
+ /// predetermend by a server it can report both ranges. Clients need to
+ /// signal support for `InsertReplaceEdits` via the
+ /// `textDocument.completion.insertReplaceSupport` client capability
+ /// property.
+ ///
+ /// *Note 1:* The text edit's range as well as both ranges from a insert
+ /// replace edit must be a [single line] and they must contain the position
+ /// at which completion has been requested.
+ /// *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range
+ /// must be a prefix of the edit's replace range, that means it must be
+ /// contained and starting at the same position.
+ ///
+ /// @since 3.16.0 additional type `InsertReplaceEdit` - proposed state
///
+ ///
+ /// TODO: Update this to union
+ ///
[Optional]
public TextEdit? TextEdit { get; set; }
diff --git a/src/Protocol/Models/FoldingRange.cs b/src/Protocol/Models/FoldingRange.cs
index d423a03e5..b61468e5f 100644
--- a/src/Protocol/Models/FoldingRange.cs
+++ b/src/Protocol/Models/FoldingRange.cs
@@ -12,22 +12,38 @@ public class FoldingRange
///
/// The zero-based line number from where the folded range starts.
///
+ ///
+ /// TODO: UPDATE THIS next version
+ /// in the LSP spec
+ ///
public long StartLine { get; set; }
///
/// The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
///
+ ///
+ /// TODO: UPDATE THIS next version
+ /// in the LSP spec
+ ///
[Optional]
public long? StartCharacter { get; set; }
///
/// The zero-based line number where the folded range ends.
///
+ ///
+ /// TODO: UPDATE THIS next version
+ /// in the LSP spec
+ ///
public long EndLine { get; set; }
///
/// The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
///
+ ///
+ /// TODO: UPDATE THIS next version
+ /// in the LSP spec
+ ///
[Optional]
public long? EndCharacter { get; set; }
diff --git a/src/Protocol/Models/FormattingOptions.cs b/src/Protocol/Models/FormattingOptions.cs
index 16b21927d..ef12199e6 100644
--- a/src/Protocol/Models/FormattingOptions.cs
+++ b/src/Protocol/Models/FormattingOptions.cs
@@ -12,6 +12,10 @@ public class FormattingOptions : Dictionary
///
/// Size of a tab in spaces.
///
+ ///
+ /// TODO: UPDATE THIS next version
+ /// in the LSP spec
+ ///
[JsonIgnore]
public long TabSize
{
diff --git a/src/Protocol/Models/InitializeParams.cs b/src/Protocol/Models/InitializeParams.cs
index e0851dd94..4cd22840a 100644
--- a/src/Protocol/Models/InitializeParams.cs
+++ b/src/Protocol/Models/InitializeParams.cs
@@ -61,7 +61,8 @@ public string? RootPath
///
/// The capabilities provided by the client (editor or tool)
///
- [MaybeNull] public ClientCapabilities Capabilities { get; set; } = null!;
+ [MaybeNull]
+ public ClientCapabilities Capabilities { get; set; } = null!;
///
/// The initial trace setting. If omitted trace is disabled ('off').
@@ -85,9 +86,21 @@ public string? RootPath
[MaybeNull]
public ProgressToken? WorkDoneToken { get; set; }
+ ///
+ /// The locale the client is currently showing the user interface
+ /// in. This must not necessarily be the locale of the operating
+ /// system.
+ ///
+ /// Uses IETF language tags as the value's syntax
+ /// (See https://en.wikipedia.org/wiki/IETF_language_tag)
+ ///
+ /// @since 3.16.0 - proposed state
+ ///
+ [Optional]
+ public string? Locale { get; set; }
+
public InitializeParams()
{
-
}
internal InitializeParams(IInitializeParams @params, ClientCapabilities clientCapabilities)
diff --git a/src/Protocol/Models/InsertReplaceEdit.cs b/src/Protocol/Models/InsertReplaceEdit.cs
new file mode 100644
index 000000000..76da170f7
--- /dev/null
+++ b/src/Protocol/Models/InsertReplaceEdit.cs
@@ -0,0 +1,33 @@
+using System.Diagnostics;
+
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Models
+{
+ ///
+ /// A special text edit to provide an insert and a replace operation.
+ ///
+ /// @since 3.16.0 - proposed state
+ ///
+ [DebuggerDisplay("{" + nameof(DebuggerDisplay) + ",nq}")]
+ public class InsertReplaceEdit
+ {
+ ///
+ /// The string to be inserted.
+ ///
+ public string NewText { get; set; }
+
+ ///
+ /// The range if the insert is requested
+ ///
+ public Range Insert { get; set; }
+
+ ///
+ /// The range if the replace is requested.
+ ///
+ public Range Replace { get; set; }
+
+ private string DebuggerDisplay => $"{Insert} / {Replace} {( string.IsNullOrWhiteSpace(NewText) ? string.Empty : NewText.Length > 30 ? NewText.Substring(0, 30) : NewText )}";
+
+ ///
+ public override string ToString() => DebuggerDisplay;
+ }
+}
diff --git a/src/Protocol/Models/InsertTextMode.cs b/src/Protocol/Models/InsertTextMode.cs
new file mode 100644
index 000000000..e7f08183e
--- /dev/null
+++ b/src/Protocol/Models/InsertTextMode.cs
@@ -0,0 +1,31 @@
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Models
+{
+ ///
+ /// How whitespace and indentation is handled during completion
+ /// item insertion.
+ ///
+ /// @since 3.16.0 - proposed state
+ ///
+ public enum InsertTextMode
+ {
+ ///
+ /// The insertion or replace strings is taken as it is. If the
+ /// value is multi line the lines below the cursor will be
+ /// inserted using the indentation defined in the string value.
+ /// The client will not apply any kind of adjustments to the
+ /// string.
+ ///
+ AsIs = 1,
+
+ ///
+ /// The editor adjusts leading whitespace of new lines so that
+ /// they match the indentation of the line for which the item
+ /// is accepted.
+ ///
+ /// For example if the line containing the cursor when a accepting
+ /// a multi line completion item is indented using 3 tabs all
+ /// following lines inserted will be indented using 3 tabs as well.
+ ///
+ AdjustIndentation = 2
+ }
+}
\ No newline at end of file
diff --git a/src/Protocol/Models/MessageActionItem.cs b/src/Protocol/Models/MessageActionItem.cs
index e8b274a89..f8db300e6 100644
--- a/src/Protocol/Models/MessageActionItem.cs
+++ b/src/Protocol/Models/MessageActionItem.cs
@@ -1,4 +1,8 @@
+using System.Collections.Generic;
using System.Diagnostics;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities;
namespace OmniSharp.Extensions.LanguageServer.Protocol.Models
{
@@ -10,6 +14,12 @@ public class MessageActionItem
///
public string Title { get; set; } = null!;
+ ///
+ /// Extension data that may contain additional properties based on
+ ///
+ [JsonExtensionData]
+ public IDictionary ExtensionData { get; set; } = new Dictionary();
+
private string DebuggerDisplay => Title;
///
diff --git a/src/Protocol/Models/Position.cs b/src/Protocol/Models/Position.cs
index 53e73ca30..cc2a63d89 100644
--- a/src/Protocol/Models/Position.cs
+++ b/src/Protocol/Models/Position.cs
@@ -20,11 +20,17 @@ public Position(int line, int character)
///
/// Line position in a document (zero-based).
///
+ ///
+ /// in the LSP spec
+ ///
public int Line { get; set; }
///
/// Character offset on a line in a document (zero-based).
///
+ ///
+ /// in the LSP spec
+ ///
public int Character { get; set; }
public override bool Equals(object? obj) => Equals(obj as Position);
diff --git a/src/Protocol/Models/Proposals/CodeLensRefreshParams.cs b/src/Protocol/Models/Proposals/CodeLensRefreshParams.cs
new file mode 100644
index 000000000..c3fe2a568
--- /dev/null
+++ b/src/Protocol/Models/Proposals/CodeLensRefreshParams.cs
@@ -0,0 +1,11 @@
+using System;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Models.Proposals
+{
+ [Obsolete(Constants.Proposal)]
+ [Parallel]
+ [Method(WorkspaceNames.CodeLensRefresh, Direction.ServerToClient)]
+ public class CodeLensRefreshParams : IRequest { }
+}
diff --git a/src/Protocol/Models/Proposals/SemanticTokens.cs b/src/Protocol/Models/Proposals/SemanticTokens.cs
index 1cf74a481..c9e0386a9 100644
--- a/src/Protocol/Models/Proposals/SemanticTokens.cs
+++ b/src/Protocol/Models/Proposals/SemanticTokens.cs
@@ -34,6 +34,9 @@ public SemanticTokens(SemanticTokensPartialResult partialResult)
/// structured pls see
/// https://github.com/microsoft/vscode-extension-samples/blob/5ae1f7787122812dcc84e37427ca90af5ee09f14/semantic-tokens-sample/vscode.proposed.d.ts#L71
///
+ ///
+ /// in the LSP spec
+ ///
public ImmutableArray Data { get; set; } = ImmutableArray.Empty;
}
}
diff --git a/src/Protocol/Models/Proposals/SemanticTokensEdit.cs b/src/Protocol/Models/Proposals/SemanticTokensEdit.cs
index 793e7388f..6db64e1b1 100644
--- a/src/Protocol/Models/Proposals/SemanticTokensEdit.cs
+++ b/src/Protocol/Models/Proposals/SemanticTokensEdit.cs
@@ -13,11 +13,17 @@ public class SemanticTokensEdit
///
/// The start index of the edit
///
+ ///
+ /// in the LSP spec
+ ///
public int Start { get; set; }
///
/// The number of items to delete
///
+ ///
+ /// in the LSP spec
+ ///
public int DeleteCount { get; set; }
///
@@ -25,6 +31,9 @@ public class SemanticTokensEdit
/// structured pls see
/// https://github.com/microsoft/vscode-extension-samples/blob/5ae1f7787122812dcc84e37427ca90af5ee09f14/semantic-tokens-sample/vscode.proposed.d.ts#L71
///
+ ///
+ /// in the LSP spec
+ ///
[Optional]
public ImmutableArray? Data { get; set; } = ImmutableArray.Empty;
}
diff --git a/src/Protocol/Models/PublishDiagnosticsParams.cs b/src/Protocol/Models/PublishDiagnosticsParams.cs
index 084dba4a1..11826c7ce 100644
--- a/src/Protocol/Models/PublishDiagnosticsParams.cs
+++ b/src/Protocol/Models/PublishDiagnosticsParams.cs
@@ -17,6 +17,9 @@ public class PublishDiagnosticsParams : IRequest
///
/// @since 3.15.0
///
+ ///
+ /// in the LSP spec
+ ///
[Optional]
public int? Version { get; set; }
diff --git a/src/Protocol/Models/TextDocumentContentChangeEvent.cs b/src/Protocol/Models/TextDocumentContentChangeEvent.cs
index 83ae04276..46a4532b6 100644
--- a/src/Protocol/Models/TextDocumentContentChangeEvent.cs
+++ b/src/Protocol/Models/TextDocumentContentChangeEvent.cs
@@ -17,6 +17,9 @@ public class TextDocumentContentChangeEvent
///
/// The length of the range that got replaced.
///
+ ///
+ /// in the LSP spec
+ ///
[Optional]
public int RangeLength { get; set; }
diff --git a/src/Protocol/Models/WorkDoneProgressBegin.cs b/src/Protocol/Models/WorkDoneProgressBegin.cs
index 0afe14a65..af4cce085 100644
--- a/src/Protocol/Models/WorkDoneProgressBegin.cs
+++ b/src/Protocol/Models/WorkDoneProgressBegin.cs
@@ -35,6 +35,10 @@ public WorkDoneProgressBegin() : base(WorkDoneProgressKind.Begin)
/// The value should be steadily rising. Clients are free to ignore values
/// that are not following this rule.
///
+ ///
+ /// TODO: Change this (breaking)
+ /// in the LSP spec
+ ///
[Optional]
public double? Percentage { get; set; }
}
diff --git a/src/Protocol/Models/WorkDoneProgressReport.cs b/src/Protocol/Models/WorkDoneProgressReport.cs
index 086701c49..c5d7149fd 100644
--- a/src/Protocol/Models/WorkDoneProgressReport.cs
+++ b/src/Protocol/Models/WorkDoneProgressReport.cs
@@ -29,6 +29,10 @@ public WorkDoneProgressReport() : base(WorkDoneProgressKind.Report)
/// The value should be steadily rising. Clients are free to ignore values
/// that are not following this rule.
///
+ ///
+ /// TODO: Change this (breaking)
+ /// in the LSP spec
+ ///
[Optional]
public double? Percentage { get; set; }
}
diff --git a/src/Protocol/Workspace/Proposals/ICodeLensRefreshHandler.cs b/src/Protocol/Workspace/Proposals/ICodeLensRefreshHandler.cs
new file mode 100644
index 000000000..f7199482a
--- /dev/null
+++ b/src/Protocol/Workspace/Proposals/ICodeLensRefreshHandler.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities;
+using OmniSharp.Extensions.LanguageServer.Protocol.Models.Proposals;
+using OmniSharp.Extensions.LanguageServer.Protocol.Server;
+
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Workspace.Proposals
+{
+
+ [Obsolete(Constants.Proposal)]
+ [Parallel]
+ [Method(WorkspaceNames.CodeLensRefresh, Direction.ServerToClient)]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods(typeof(IWorkspaceLanguageServer), typeof(ILanguageServer))]
+ public interface ICodeLensRefreshHandler : IJsonRpcRequestHandler, ICapability { }
+
+ [Obsolete(Constants.Proposal)]
+ public abstract class CodeLensRefreshHandlerBase : ICodeLensRefreshHandler
+ {
+ protected CodeLensCapability? Capability { get; private set; }
+
+ public abstract Task Handle(CodeLensRefreshParams request, CancellationToken cancellationToken);
+ public void SetCapability(CodeLensCapability capability) => Capability = capability;
+ }
+}
diff --git a/src/Protocol/WorkspaceNames.cs b/src/Protocol/WorkspaceNames.cs
index 730dc17fd..afa5d8d2f 100644
--- a/src/Protocol/WorkspaceNames.cs
+++ b/src/Protocol/WorkspaceNames.cs
@@ -14,5 +14,7 @@ public static class WorkspaceNames
public const string WorkspaceFolders = "workspace/workspaceFolders";
[Obsolete(Constants.Proposal)]
public const string SemanticTokensRefresh = "workspace/semanticTokens/refresh";
+ [Obsolete(Constants.Proposal)]
+ public const string CodeLensRefresh = "workspace/codeLens/refresh";
}
}
diff --git a/test/Lsp.Tests/Capabilities/Client/ClientCapabilitiesTests_$SimpleTest.json b/test/Lsp.Tests/Capabilities/Client/ClientCapabilitiesTests_$SimpleTest.json
index 425715472..126d5014e 100644
--- a/test/Lsp.Tests/Capabilities/Client/ClientCapabilitiesTests_$SimpleTest.json
+++ b/test/Lsp.Tests/Capabilities/Client/ClientCapabilitiesTests_$SimpleTest.json
@@ -2,7 +2,8 @@
"workspace": {
"applyEdit": true,
"workspaceEdit": {
- "documentChanges": true
+ "documentChanges": true,
+ "normalizesLineEndings": false
},
"didChangeConfiguration": {
"dynamicRegistration": true
diff --git a/test/Lsp.Tests/Capabilities/Client/WorkspaceClientCapabilitiesTests_$SimpleTest.json b/test/Lsp.Tests/Capabilities/Client/WorkspaceClientCapabilitiesTests_$SimpleTest.json
index 30d691678..7adc77fbc 100644
--- a/test/Lsp.Tests/Capabilities/Client/WorkspaceClientCapabilitiesTests_$SimpleTest.json
+++ b/test/Lsp.Tests/Capabilities/Client/WorkspaceClientCapabilitiesTests_$SimpleTest.json
@@ -1,7 +1,8 @@
{
"applyEdit": true,
"workspaceEdit": {
- "documentChanges": true
+ "documentChanges": true,
+ "normalizesLineEndings": false
},
"didChangeConfiguration": {
"dynamicRegistration": true
diff --git a/test/Lsp.Tests/Models/CompletionItemTests_$SimpleTest.json b/test/Lsp.Tests/Models/CompletionItemTests_$SimpleTest.json
index b8ddf1c94..754837233 100644
--- a/test/Lsp.Tests/Models/CompletionItemTests_$SimpleTest.json
+++ b/test/Lsp.Tests/Models/CompletionItemTests_$SimpleTest.json
@@ -4,6 +4,7 @@
"deprecated": false,
"preselect": false,
"insertTextFormat": 0,
+ "insertTextMode": 0,
"additionalTextEdits": [
{
"range": null,
diff --git a/test/Lsp.Tests/Models/CompletionListTests_$ComplexTest.json b/test/Lsp.Tests/Models/CompletionListTests_$ComplexTest.json
index 232bd4b88..ed9ffa2fe 100644
--- a/test/Lsp.Tests/Models/CompletionListTests_$ComplexTest.json
+++ b/test/Lsp.Tests/Models/CompletionListTests_$ComplexTest.json
@@ -7,7 +7,8 @@
"detail": "details",
"deprecated": false,
"preselect": false,
- "insertTextFormat": 0
+ "insertTextFormat": 0,
+ "insertTextMode": 0
}
]
}
diff --git a/test/Lsp.Tests/Models/CompletionListTests_$SimpleTest.json b/test/Lsp.Tests/Models/CompletionListTests_$SimpleTest.json
index 6b01f9a33..3bb0b7494 100644
--- a/test/Lsp.Tests/Models/CompletionListTests_$SimpleTest.json
+++ b/test/Lsp.Tests/Models/CompletionListTests_$SimpleTest.json
@@ -5,6 +5,7 @@
"detail": "details",
"deprecated": false,
"preselect": false,
- "insertTextFormat": 0
+ "insertTextFormat": 0,
+ "insertTextMode": 0
}
]