Skip to content

Commit

Permalink
Fixes #389, updating the readme for the helix configuration (#391)
Browse files Browse the repository at this point in the history
## Summary

Fixes #389, updating the readme for the helix configuration
  • Loading branch information
luccahuguet committed Feb 29, 2024
1 parent 1f1757b commit a7de1dc
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,36 +182,35 @@ 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 v23.10, Helix supports the use of multiple language servers for a given language. This
enables, for example, 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

0 comments on commit a7de1dc

Please sign in to comment.