Hasty Briefsbeta

Bilingual

Lsp-CLI: CLI language client for LSP language servers

4 months ago
  • #command-line
  • #language-server
  • #LSP
  • lsp-cli is a command-line interface (CLI) implementation of the Language Server Protocol (LSP).
  • It allows language servers to be used outside of editors, enabling scripting and build pipeline integration.
  • Primary use case is LTEX LS (LanguageTool language server), but most LSP-compatible servers should work.
  • Features include printing diagnostics (linting), code actions, client configuration, and customization via JSON.
  • Limitations: Client-side diagnostic requests are not supported by LSP; relies on server notifications.
  • System requirements: 64-bit Linux, Mac, Windows, or any OS with Java 11+.
  • Installation involves downloading platform-specific or platform-independent releases from GitHub.
  • Startup scripts (bin/lsp-cli or bin\lsp-cli.bat) are recommended, with environment variables for Java settings.
  • Command-line arguments include server configuration, working directory, verbosity, and file paths.
  • Help messages and default values can be customized via a JSON file (.lsp-cli.json).
  • Exit codes indicate success (0), exceptions (1), invalid arguments (2), or diagnostics found (3).