Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #389, updating the readme for the helix configuration #391

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,36 +182,33 @@ Upon successful installation, you should see errors surfaced directly in your ed
### Example: Helix

To use `ruff-lsp` with [Helix](https://helix-editor.com/), add something like the following to
`~/.config/helix/languages.toml`:
`~/.config/helix/languages.toml` (in this case with auto-format enabled):

```toml
[language-server.ruff]
command = "ruff-lsp"
[[language]]
name = "python"
scope = "source.python"
language-server = { command = "ruff-lsp" }
config = { settings = { args = [] } }
language-servers = [ "ruff" ]
auto-format = true
```

Upon successful installation, you should see errors surfaced directly in your editor:

![](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`:
As of Helix 23.10, there is support for multiple language servers for language. This enables for instance, 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-servers = [ "pyright", "ruff" ]

[language-server.ruff]
command = "ruff-lsp"
config = { settings = { run = "onSave" } }

[language-server.ruff.config.settings]
args = ["--ignore", "E501"]
```

### Example: Lapce
Expand Down
Loading