diff --git a/lsp-sample/server/src/server.ts b/lsp-sample/server/src/server.ts index cab1241b..a4a74c1a 100644 --- a/lsp-sample/server/src/server.ts +++ b/lsp-sample/server/src/server.ts @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ - import { createConnection, TextDocuments, @@ -53,7 +52,7 @@ connection.onInitialize((params: InitializeParams) => { const result: InitializeResult = { capabilities: { - textDocumentSync: TextDocumentSyncKind.Full, + textDocumentSync: TextDocumentSyncKind.Incremental, // Tell the client that the server supports code completion completionProvider: { resolveProvider: true @@ -224,26 +223,6 @@ connection.onCompletionResolve( } ); -/* -connection.onDidOpenTextDocument((params) => { - // A text document got opened in VSCode. - // params.textDocument.uri uniquely identifies the document. For documents store on disk this is a file URI. - // params.textDocument.text the initial full content of the document. - connection.console.log(`${params.textDocument.uri} opened.`); -}); -connection.onDidChangeTextDocument((params) => { - // The content of a text document did change in VSCode. - // params.textDocument.uri uniquely identifies the document. - // params.contentChanges describe the content changes to the document. - connection.console.log(`${params.textDocument.uri} changed: ${JSON.stringify(params.contentChanges)}`); -}); -connection.onDidCloseTextDocument((params) => { - // A text document got closed in VSCode. - // params.textDocument.uri uniquely identifies the document. - connection.console.log(`${params.textDocument.uri} closed.`); -}); -*/ - // Make the text document manager listen on the connection // for open, change and close text document events documents.listen(connection);