Skip to main content

A LSP Proxy to multiple language servers

Project description

multi-lsp-proxy

GitHub Actions PyPI Crates.io

A barely working LSP Proxy to multiple language servers, to use multiple LSPs per language in editors that doesn't support multiple LSPs per language natively like Helix (version 22.12).

Installation

Install with pipx is recommended:

pipx install multi-lsp-proxy

Pip also works:

pip install multi-lsp-proxy

Usage

Usage: multi-lsp-proxy [OPTIONS] --config <CONFIG>

Options:
  -c, --config <CONFIG>      Configuration file path
  -l, --language <LANGUAGE>  Select language servers by programming language name
  -h, --help                 Print help
  -V, --version              Print version

To use with Helix, set the language-server option in languages.toml, below is an example for Python that enables both pyright-langserver and ruff-lsp:

# Helix languages.toml file
[[language]]
 name = "python"
 scope = "source.python"
 injection-regex = "python"
 file-types = ["py", "pyi"]
 shebangs = ["python"]
 roots = ["pyproject.toml", "setup.py", "Poetry.lock"]
 comment-token = "#"
 language-server = { command = "multi-lsp-proxy", args = ["--config", "/path/to/multi-lsp-config.toml"] }
 auto-format = false
 indent = { tab-width = 4, unit = "    " }
 config = {}

and configure multi-lsp-proxy in multi-lsp-proxy.toml

log-file = "/tmp/multi-lsp-proxy.log"

[[language]]
name = "python"
command = "pyright-langserver"
args = ["--stdio"]

[[language]]
name = "python"
command = "ruff-lsp"

License

This work is released under the MIT license. A copy of the license is provided in the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

multi_lsp_proxy-0.1.3.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distributions

multi_lsp_proxy-0.1.3-py3-none-win_amd64.whl (1.1 MB view hashes)

Uploaded Python 3 Windows x86-64

multi_lsp_proxy-0.1.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

multi_lsp_proxy-0.1.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (2.5 MB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ i686

multi_lsp_proxy-0.1.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

multi_lsp_proxy-0.1.3-py3-none-macosx_11_0_arm64.whl (1.4 MB view hashes)

Uploaded Python 3 macOS 11.0+ ARM64

multi_lsp_proxy-0.1.3-py3-none-macosx_10_7_x86_64.whl (1.5 MB view hashes)

Uploaded Python 3 macOS 10.7+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page