Skip to content

Commit 2414bd3

Browse files
authored
Add referesh capability for codelens (#34)
* Add referesh capability for codelens
1 parent 7629297 commit 2414bd3

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.4.7] - 24.08.2022
8+
9+
### Added
10+
11+
* [Client workspace capabilities for Code Lenses](https://github.com/ionide/LanguageServerProtocol/pull/34)
12+
713
## [0.4.6] - 23.08.2022
814

915
### Added

src/Types.fs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,17 @@ type InlayHintWorkspaceClientCapabilities =
333333
/// change that requires such a calculation.
334334
RefreshSupport: bool option }
335335

336+
type CodeLensWorkspaceClientCapabilities = {
337+
/// Whether the client implementation supports a refresh request sent from the
338+
/// server to the client.
339+
///
340+
/// Note that this event is global and will force the client to refresh all
341+
/// code lenses currently shown. It should be used with absolute care and is
342+
/// useful for situation where a server for example detect a project wide
343+
/// change that requires such a calculation.
344+
RefreshSupport: bool option
345+
}
346+
336347
/// Workspace specific client capabilities.
337348
type WorkspaceClientCapabilities =
338349
{ /// The client supports applying batch edits to the workspace by supporting
@@ -360,7 +371,12 @@ type WorkspaceClientCapabilities =
360371
/// Client workspace capabilities specific to inlay hints.
361372
///
362373
/// @since 3.17.0
363-
InlayHint: InlayHintWorkspaceClientCapabilities option }
374+
InlayHint: InlayHintWorkspaceClientCapabilities option
375+
376+
/// Client workspace capabilities specific to code lenses.
377+
///
378+
/// @since 3.16.0
379+
CodeLens: CodeLensWorkspaceClientCapabilities option }
364380

365381
type SynchronizationCapabilities =
366382
{ /// Whether text document synchronization supports dynamic registration.

tests/Benchmarks.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,8 @@ type MultipleTypesBenchmarks() =
401401
{ DynamicRegistration = Some false
402402
SymbolKind = Some { ValueSet = Some SymbolKindCapabilities.DefaultValueSet } }
403403
SemanticTokens = Some { RefreshSupport = Some true }
404-
InlayHint = Some { RefreshSupport = Some false } }
404+
InlayHint = Some { RefreshSupport = Some false }
405+
CodeLens = Some { RefreshSupport = Some true } }
405406
TextDocument =
406407
Some
407408
{ Synchronization =

0 commit comments

Comments
 (0)