Skip to main content

TeXlyre LSP Recipes

This repository contains Language Server Protocol (LSP) recipes for use with the SettingsExternal ToolsGeneric LSPLSP Recipes setting in TeXlyre.

Each recipe in the recipes directory provides:

  • A brief description of the LSP tool
  • Installation instructions
  • How to run the server (including WebSocket proxies if required)
  • A ready-to-paste JSON configuration for TeXlyre

TeXlyre’s LSP client is capability-aware. Editor features are enabled when the connected language server advertises the corresponding capability.

Supported LSP Features​

GroupFeatureLSP method / capabilitySupport
Connection & workspaceInitializationinitialize / initialized✅
Root URIrootUri✅
Workspace foldersworkspaceFolders✅
Initialization optionsinitializationOptions✅
Workspace configurationworkspace/configuration✅
Document synchronizationOpen documenttextDocument/didOpen✅
Full document changestextDocument/didChange✅
Incremental document changestextDocument/didChange✅
Save notificationtextDocument/didSave✅ Respects includeText
Close documenttextDocument/didClose✅
Completion & assistanceAuto-completiontextDocument/completion✅
Completion trigger contextCompletionContext✅
Incomplete completion listsisIncomplete✅
Completion text editsTextEdit✅
Insert/replace completion editsInsertReplaceEdit✅
Additional completion editsadditionalTextEdits✅
Completion snippetsinsertTextFormat: Snippet✅
Completion documentationdocumentation✅ Markdown / plaintext
Hover informationtextDocument/hover✅ Markdown / plaintext
Signature helptextDocument/signatureHelp✅ Basic support
Navigation & structureGo to declarationtextDocument/declaration✅
Go to definitiontextDocument/definition✅
Go to type definitiontextDocument/typeDefinition✅
Go to implementationtextDocument/implementation✅
Location responsesLocation / Location[]✅
Location linksLocationLink✅
Same-file navigationNavigation result✅
Cross-file navigationNavigation result✅
Document symbolstextDocument/documentSymbol✅
Hierarchical document symbolsDocumentSymbol[]✅
Legacy document symbolsSymbolInformation[]✅
LSP-powered outlineDocument symbols✅
Diagnostics & actionsDiagnostics / lintingtextDocument/publishDiagnostics✅
Document highlightstextDocument/documentHighlight✅
Code actions / quick fixestextDocument/codeAction✅
Code action commandsworkspace/executeCommand✅
Workspace edits from code actionsWorkspaceEdit◐ Current file
Server-requested workspace editsworkspace/applyEdit◐ Current file
Semantic highlightingSemantic tokenstextDocument/semanticTokens/full✅ Full document
Semantic-token refreshworkspace/semanticTokens/refresh✅
Server messagesLog messageswindow/logMessage✅
Show messageswindow/showMessage✅ Logged
Message requestswindow/showMessageRequest◐ Non-interactive

Support depends on the capabilities of the individual language server. Some more general LSP operations, including references, rename, formatting, textDocument/willSave, textDocument/willSaveWaitUntil, and workspace/didChangeWatchedFiles, are not currently exposed by TeXlyre.


How Generic LSP configs work in TeXlyre​

TeXlyre expects an array of LSP configurations. Each configuration object has the following important fields:

  • id A unique identifier for the LSP configuration.

  • name A human-readable name shown in the UI.

  • enabled Whether TeXlyre should attempt to connect to this server.

  • fileExtensions File extensions that should activate this LSP.

  • languageIdMap (optional) Maps file extensions to the LSP languageId. This is useful when an LSP expects a specific language (for example, treating TeX, Typst, and BibTeX as markdown for prose-focused servers).

  • transportConfig Defines how TeXlyre communicates with the server.

    • type: Currently most commonly websocket
    • url: WebSocket address TeXlyre connects to
    • contentLength (optional): Disable if the server or proxy does not use Content-Length framing
  • clientConfig A JSON string passed to the LSP client during initialization. A minimal setup usually includes rootUri and workspaceFolders.


Minimal example​

[
{
"id": "example-lsp",
"name": "Example LSP",
"enabled": true,
"fileExtensions": ["tex"],
"transportConfig": {
"type": "websocket",
"url": "ws://localhost:7000"
},
"clientConfig": "{\"rootUri\":\"file:///\",\"workspaceFolders\":[]}"
}
]

Contributing​

When contributing a new recipe:

  • Create a new folder under recipes/

  • Add a README.md

  • Keep the README structured as:

    1. What the LSP does
    2. How to install it
    3. How to run it
    4. TeXlyre JSON configuration

For creating installable recipes without having to manually install the server natively and copy configurations to TeXlyre, contribute to Chelys recipes