Skip to content

Commit

Permalink
Minor formatting adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
snowsignal committed Mar 25, 2024
1 parent 95fafef commit b74f7dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions crates/ruff_server/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exclusive mutable access to the state and execute immediately, blocking the even
tasks, run immediately on a thread pool with an immutable snapshot of the state, and do _not_ block the event loop unless the thread pool
queue is full, in which case the server will block on available queue space.

Snapshots of the server state use atomic reference-counted pointers (`Arc`) to prevent unnessecary cloning of large text files. If the contents
Snapshots of the server state use atomic reference-counted pointers (`Arc`) to prevent unnecessary cloning of large text files. If the contents
of the text file need to be updated, the state will create a new `Arc` to store it. This allows a local task to run at the same time as multiple background tasks
without changing the state the background tasks are working with. This only applies to background tasks started _before_ the local task though, as a local task blocks
the handling of further messages (and therefore, dispatching future tasks) until its completion.
Expand All @@ -23,7 +23,7 @@ data races and out-of-order handler execution. Our approach avoids this issue by

### Testing

Most editors with LSP support will let you provide a server command for that language server. Ruff's server command is `ruff server --preview`, which will begin running a language server that listens to messages on `stdin` and responds on `stdout`.
Most editors with LSP support will let you provide a server command for that language server. Ruff's server command is `ruff server --preview`, which will begin running a language server that listens to messages on `stdin` and responds on `stdout`.

In order to test your local server, you'll need to provide a path to your locally-built binary (usually `<path to your ruff source>/target/debug/ruff`) along with the arguments `server` and `--preview`. Make sure to (re)build the server with `cargo build -p ruff` before restarting your editor to test!

Expand Down
24 changes: 11 additions & 13 deletions crates/ruff_server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ files in your editor's workspace, and will refresh its in-memory configuration w

### Roadmap

`ruff server` is still in an early stage of development. This roadmap is an overview of the planned features for `ruff server` so far.
`ruff server` is still in an early stage of development. This roadmap is an overview of the planned features for `ruff server` so far.
It is subject to change as the project evolves.

- [X] Lint diagnostics show in Python files
- [X] Quick Fixes for diagnostics
- [X] Full-document formatting
- [X] Range formatting
- [X] Multi-threaded, lock-free architecture
- [X] In-memory document cache that tracks changes to unsaved files
- [X] NeoVim support
- [X] VSCode support (pre-release extension only, with limitations)
- [X] Uses `pyproject.toml`/`ruff.toml`/`.ruff.toml` for linter/formatter configuration, per workspace folder
- [X] Automatic configuration reloading when a config file is changed on disk
- [x] Lint diagnostics show in Python files
- [x] Quick Fixes for diagnostics
- [x] Full-document formatting
- [x] Range formatting
- [x] Multi-threaded, lock-free architecture
- [x] In-memory document cache that tracks changes to unsaved files
- [x] NeoVim support
- [x] VSCode support (pre-release extension only, with limitations)
- [x] Uses `pyproject.toml`/`ruff.toml`/`.ruff.toml` for linter/formatter configuration, per workspace folder
- [x] Automatic configuration reloading when a config file is changed on disk
- [ ] Jupyter Notebook document support
- [ ] Source-level Code Actions / Commands for VS Code (Fix All, Organize Imports)
- [ ] Substantial test suite for features and common scenarios
Expand All @@ -33,8 +33,6 @@ It is subject to change as the project evolves.
- [ ] Task progress bar
- [ ] Test suite that directly emulates real editor sessions


### Contributing

If you're interested in contributing to `ruff server` - well, first of all, thank you! Second of all, you might find the [**contribution guide**](CONTRIBUTING.md) to be a useful resource. Finally, don't hesitate to reach out on our [**Discord**](https://discord.com/invite/astral-sh) if you have questions.

0 comments on commit b74f7dd

Please sign in to comment.