This PR moves the Clippy configuration up to the workspace level.
We're using the [`lints`
table](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table)
to configure the Clippy ruleset in the workspace's `Cargo.toml`.
Each crate in the workspace now has the following in their own
`Cargo.toml` to inherit the lints from the workspace:
```toml
[lints]
workspace = true
```
This allows for configuring rust-analyzer to show Clippy lints in the
editor by using the following configuration in your Zed `settings.json`:
```json
{
"lsp": {
"rust-analyzer": {
"initialization_options": {
"check": {
"command": "clippy"
}
}
}
}
```
Release Notes:
- N/A
Hopefully this makes it a bit easier for new contributors to dive into
the codebase :)
Release Notes:
- Improved documentation for many core editor types
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
This does two things:
1. It optimizes the constructions of `SumTree`s to not insert nodes
one-by-one, but instead inserts them level-by-level. That makes it more
efficient to construct large `SumTree`s.
2. It adds a `from_par_iter` constructor that parallelizes the
construction of `SumTree`s.
In combination, **loading a 500MB plain text file went from from
~18seconds down to ~2seconds**.
Disclaimer: I didn't write any of this code, lol! It's all @as-cii and
@nathansobo.
Release Notes:
- Improved performance when opening very large files.
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Julia <julia@zed.dev>
This fixes a bug that could cause the cursor to incorrectly report its
start when using `slice` or `seek_forward`, and then calling `prev`. We
didn't notice this because we were not testing those three methods
together.
I suppose this could explain some of the panics we've observed because
we do use `slice`/`seek_forward` followed by `prev` calls in production.
This commit introduces a new adaptor trait for SeekTarget that works around
frustrating issues with lifetimes. It wraps the arguments in a newtype wrapper
that lives on the stack to avoid the lifetime getting extended to the caller
of the method.
This allows us to introduce a PathSuccessor object that can be passed as the
end argument of remove_between to remove a whole subtree.
This lets us use `next` or `prev` to decide whether to park the cursor
at the first or last filtered item.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>