Skip to content

Commit 90c06d0

Browse files
author
N. Taylor Mullen
authored
Fix TextDocument synchronization for LSP3
- For LSP3 clients the TextDocumentSynchronization kind is always set to none without this. For the VS LSP client this results in language servers never getting any text document synchronization events.
1 parent ad24c91 commit 90c06d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Server/LanguageServer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ async Task<InitializeResult> IRequestHandler<InitializeParams, InitializeResult>
458458
{
459459
serverCapabilities.TextDocumentSync = new TextDocumentSyncOptions()
460460
{
461-
Change = TextDocumentSyncKind.None,
461+
Change = textDocumentSyncKind,
462462
OpenClose = _collection.ContainsHandler(typeof(IDidOpenTextDocumentHandler)) || _collection.ContainsHandler(typeof(IDidCloseTextDocumentHandler)),
463463
Save = _collection.ContainsHandler(typeof(IDidSaveTextDocumentHandler)) ?
464464
new SaveOptions() { IncludeText = true /* TODO: Make configurable */ } :

0 commit comments

Comments
 (0)