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

Write ruff server setup guide for Helix #11183

Merged
merged 6 commits into from
Apr 30, 2024
Merged
Changes from 2 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
30 changes: 30 additions & 0 deletions crates/ruff_server/docs/setup/HELIX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Helix Setup Guide for `ruff server`

First, open the language configuration file for Helix. On Linux and macOS, this will be at `~/.config/helix/languages.toml`,
and on Windows this will be in `%AppData%\helix\languages.toml`.
snowsignal marked this conversation as resolved.
Show resolved Hide resolved

Add the language server by adding:

```toml
[language-server.ruff]
command = "ruff"
args = ["server", "--preview"]
snowsignal marked this conversation as resolved.
Show resolved Hide resolved
```

Then, you'll register the language server as the one to use with Python.
If you don't already have a language server registered to use with Python, add this to `languages.toml`:

```toml
[[language]]
name = "python"
language-servers = [ "ruff" ]
```

Otherwise, if you already have `language-servers` defined, you can simply add `"ruff"` to the list. For example,
if you already have `pylsp` as a language server, you can modify the language entry as follows:
snowsignal marked this conversation as resolved.
Show resolved Hide resolved

```toml
[[language]]
name = "python"
language-servers = [ "ruff", "pylsp" ]
```
Loading