RepoMicrosoftMicrosoftpublished Sep 3, 2015seen 2w

microsoft/vscode-languageserver-node

TypeScript

Open original ↗

Captured source

source ↗

microsoft/vscode-languageserver-node

Description: Language server protocol implementation for VSCode. This allows implementing language services in JS/TS running on node.js

Language: TypeScript

License: MIT

Stars: 1759

Forks: 387

Open issues: 78

Created: 2015-09-03T13:39:52Z

Pushed: 2026-06-12T06:56:24Z

Default branch: main

Fork: no

Archived: no

README:

VSCode Language Server - Node

This repository contains the code for the following npm modules:

  • _vscode-languageclient_: npm module to talk to a VSCode language server from a VSCode extension:
  • _vscode-languageserver_: npm module to implement a VSCode language server using Node.js as a runtime:
  • _vscode-languageserver-textdocument_: npm module to implement text documents usable in a LSP server using Node.js as a runtime:
  • _vscode-languageserver-protocol_: the actual language server protocol definition in TypeScript:
  • _vscode-languageserver-types_: data types used by the language server client and server:
  • _vscode-jsonrpc_: the underlying message protocol to communicate between a client and a server:

All npm modules are built using one Azure Pipeline. Its status is:

![Build Status](https://dev.azure.com/vscode/vscode-languageserver-node/_build/latest?definitionId=52&branchName=main)

Click here for a detailed document on how to use these npm modules to implement language servers for VSCode.

Contributing

After cloning the repository, run npm install to install dependencies and npm run symlink to point packages in this repository to each other.

History

3.18.0 Protocol, 9.0.0 JSON-RPC, 10.0.0 Client and 10.0.0 Server.

Protocol - new requests / notifications

  • added textDocument/inlineCompletion: inline completion request, params, registration options, and client capabilities. New file protocol.inlineCompletion.ts.
  • added workspace/textDocumentContent + workspace/textDocumentContent/refresh: server-provided dynamic text document content for custom schemes (multi-scheme registration supported).
  • added textDocument/rangesFormatting: format multiple ranges in one request (DocumentRangesFormattingRequest, DocumentRangesFormattingParams).
  • added workspace/foldingRange/refresh: server‑initiated folding-range refresh (FoldingRangeRefreshRequest, FoldingRangeWorkspaceClientCapabilities).
  • Notebook diagnostic pull and notebook code-action-kind support added on top of the existing notebook feature.
  • added proposed CodeActionKind.RefactorMove

Protocol - new features

Workspace edits — workspace/applyEdit, textDocument/rename, code actions

  • WorkspaceEdit may now carry SnippetTextEdit entries (snippet support in workspace edits). New client capability workspace.workspaceEdit.snippetEditSupport. See main.ts.
  • WorkspaceEditMetadata added; ApplyWorkspaceEditParams.metadata carries it, with new client capability workspace.workspaceEdit.metadataSupport. Currently includes isRefactoring. See protocol.ts.
  • Command.tooltip proposed on the existing Command type. main.ts.

Completion — textDocument/completion / completionItem/resolve

  • CompletionList.itemDefaults extended with data (per‑item default data payload).
  • New CompletionList.applyKind (CompletionItemApplyKinds) describes per-field merge strategy (Replace/Merge) for commitCharacters and data between list defaults and individual items. Gated by new client capability completionList.applyKindSupport. See main.ts.
  • EditRangeWithInsertReplace made a named type and exposed via CompletionItemDefaults.editRange.
  • CompletionItem.textEdit may carry an InsertReplaceEdit (already in 3.17; capabilities cleaned up).

Code action — textDocument/codeAction / codeAction/resolve

  • New CodeAction.tags field; CodeActionTag.LLMGenerated lets servers mark LLM‑generated actions. Client capability textDocument.codeAction.tagSupport. - CodeActionOptions.documentation: CodeActionKindDocumentation[] — providers can ship docs that appear in the actions menu. Client capability textDocument.codeAction.documentationSupport.
  • New code action kind CodeActionKind.RefactorMove.
  • New code action kind CodeActionKind.Notebook (and notebook code‑action‑kind support in the client).

Rename — textDocument/rename / textDocument/prepareRename

  • PrepareRenameResult reified as named types: PrepareRenamePlaceholder and PrepareRenameDefaultBehavior (server can return { defaultBehavior: true } to ask the client to fall back to its default rename behavior).

Formatting — textDocument/rangeFormatting

  • DocumentRangeFormattingClientCapabilities.rangesSupport and matching DocumentRangeFormattingOptions.rangesSupport: a single capability flag that gates support for the new textDocument/rangesFormatting (multi‑range) request alongside the existing single‑range one.

Diagnostics — textDocument/publishDiagnostics + pull (textDocument/diagnostic, workspace/diagnostic)

  • Diagnostic.message may now be a MarkupContent (proposed). Client capability textDocument.diagnostic.markupMessageSupport.

Folding ranges — textDocument/foldingRange

  • FoldingRangeClientCapabilities extended with named ClientFoldingRangeKindOptions and ClientFoldingRangeOptions (the latter exposes collapsedText).
  • New workspace capability bucket FoldingRangeWorkspaceClientCapabilities (refreshSupport) — pairs with the new workspace/foldingRange/refresh request.

Semantic tokens — textDocument/semanticTokens/*

  • SemanticTokenTypes.label added.
  • SemanticTokenTypes / SemanticTokenModifiers redefined as an open set (servers may report values outside the predefined list; clients must tolerate them).

Code lens — textDocument/codeLens / codeLens/resolve

  • CodeLensClientCapabilities.resolveSupport: ClientCodeLensResolveOptions — lets a client advertise which properties it can resolve lazily.

Window / messages

  • MessageType.Debug (5) added — used by window/logMessage (and accepted everywhere MessageType appears).

Document filters / file watching — affects every request that uses a DocumentSelector

  • pattern is now a...

Excerpt shown — open the source for the full document.

Notability

notability 5.0/10

Solid language server tool repo, modest traction.