mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Merge commit '0113bc9388
' into sync-from-ra
This commit is contained in:
parent
f43cea0878
commit
b8a3180a60
197 changed files with 3106 additions and 2007 deletions
|
@ -239,13 +239,13 @@ The primary goal of `onEnter` is to handle automatic indentation when opening a
|
|||
This is not yet implemented.
|
||||
The secondary goal is to handle fixing up syntax, like continuing doc strings and comments, and escaping `\n` in string literals.
|
||||
|
||||
As proper cursor positioning is raison-d'etat for `onEnter`, it uses `SnippetTextEdit`.
|
||||
As proper cursor positioning is raison d'être for `onEnter`, it uses `SnippetTextEdit`.
|
||||
|
||||
### Unresolved Question
|
||||
|
||||
* How to deal with synchronicity of the request?
|
||||
One option is to require the client to block until the server returns the response.
|
||||
Another option is to do a OT-style merging of edits from client and server.
|
||||
Another option is to do a operational transforms style merging of edits from client and server.
|
||||
A third option is to do a record-replay: client applies heuristic on enter immediately, then applies all user's keypresses.
|
||||
When the server is ready with the response, the client rollbacks all the changes and applies the recorded actions on top of the correct response.
|
||||
* How to deal with multiple carets?
|
||||
|
|
|
@ -99,14 +99,7 @@ Including a description and GIF suitable for the changelog means less work for t
|
|||
|
||||
## Clippy
|
||||
|
||||
We don't enforce Clippy.
|
||||
A number of default lints have high false positive rate.
|
||||
Selectively patching false-positives with `allow(clippy)` is probably worse than entirely disabling a problematic lint.
|
||||
There's a `cargo lint` command which runs a subset of low-FPR lints.
|
||||
Careful tweaking of `lint` is welcome.
|
||||
Of course, applying Clippy suggestions is welcome as long as they indeed improve the code.
|
||||
|
||||
**Rationale:** see [rust-lang/clippy#5537](https://github.com/rust-lang/rust-clippy/issues/5537).
|
||||
We use Clippy to improve the code, but if some lints annoy you, allow them in the [Cargo.toml](../../Cargo.toml) [workspace.lints.clippy] section.
|
||||
|
||||
# Code
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ Interior nodes are shared as well (for example in `(1 + 1) * (1 + 1)`).
|
|||
Note that, the result of the interning is an `Arc<Node>`.
|
||||
That is, it's not an index into interning table, so you don't have to have the table around to do anything with the tree.
|
||||
Each tree is fully self-contained (although different trees might share parts).
|
||||
Currently, the interner is created per-file, but it will be easy to use a per-thread or per-some-contex one.
|
||||
Currently, the interner is created per-file, but it will be easy to use a per-thread or per-some-context one.
|
||||
|
||||
We use a `TextSize`, a newtyped `u32`, to store the length of the text.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue