Rust Analyzer: Inlay hint fragments apply in reverse order #7928
Labels
defect
[core label]
inlay hints
language server
An umbrella label for all language servers
language
An umbrella label for all programming languages syntax behaviors
rust
Rust programming language support
Check for existing issues
Describe the bug / provide steps to reproduce it
Rust Analyzer has optional hints for closure captures. When enabled Zed shows their fragments in reverse order.
Version:
Zed 0.122.2
a1c5d027319bd80ae348fa3ce2be22c2a6785284
Steps to reproduce:
cargo new inlay-hints-reverse-fragments
, replace the code inmain.rs
with the following:Results:
(I put hints in comments to keep GitHub Syntax highlighter happy):
You can see how fragments of hints get applied in reverse order. Also, As I type code (just add spaces at the end) I sometimes see them flicker, extra parenthesis may show up or hide, etc. Seems like some inconsistencies during updates, but most likely an unrelated issue.
VSCode shows these hints correctly, as do unit tests in Rust Analyzer repo: https://github.com/rust-lang/rust-analyzer/blob/ac998a74b3c8ff4b81c3eeb9a18811d4cc76226d/crates/ide/src/inlay_hints/closure_captures.rs#L143
Environment
Zed: v0.122.2 (Zed)
OS: macOS 12.7.3
Memory: 32 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.If you only need the most recent lines, you can run the
zed: open log
command palette action to see the last 1000.No response
The text was updated successfully, but these errors were encountered: