From 10f409e83f9498aaf9fc264963f6a65b94c28f06 Mon Sep 17 00:00:00 2001 From: jan Apisu <108279865+aspizu@users.noreply.github.com> Date: Tue, 3 Oct 2023 19:55:55 +0530 Subject: [PATCH] Add instructions for configuring Helix to use `ruff-lsp` alongside another language server such as `pyright`. (#261) --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index d8cc20e..0cb1ada 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,24 @@ Upon successful installation, you should see errors surfaced directly in your ed ![](https://user-images.githubusercontent.com/1309177/209262106-71e34f8d-73cc-4889-89f7-3f54a4481c52.png) +Future versions of Helix support the use of multiple language servers. The following configuration +would enable the use of `ruff-lsp` alongside a language server like `pyright`: + +```toml +[[language]] +name = "python" +roots = ["pyproject.toml"] +language-servers = ["pyright", "ruff"] + +[language-server.pyright] +command = "pyright-langserver" +args = ["--stdio"] + +[language-server.ruff] +command = "ruff-lsp" +config = { settings = { run = "onSave" } } +``` + ### Example: Lapce To use `ruff-lsp` with [Lapce](https://lapce.dev/), install the [`lapce-ruff-lsp`](https://plugins.lapce.dev/plugins/abreumatheus/lapce-ruff-lsp)