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

rust completion label of chained iter is incomplete #24936

Open
xzbdmw opened this issue Feb 15, 2025 · 3 comments
Open

rust completion label of chained iter is incomplete #24936

xzbdmw opened this issue Feb 15, 2025 · 3 comments
Labels
rust Rust programming language support

Comments

@xzbdmw
Copy link
Contributor

xzbdmw commented Feb 15, 2025

Summary

iShot_2025-02-15_13.09.52.mp4

all the inter().METHOD's METHOD is missing, in this video, find

Zed Version and System Specs

Zed: v0.173.10 (Zed)
OS: macOS 14.6.1
Memory: 32 GiB
Architecture: aarch64

@xzbdmw
Copy link
Contributor Author

xzbdmw commented Feb 15, 2025

Image

Also applies to self.METHOD (draw's highlight get shifted to self)

@notpeter
Copy link
Member

Can you provide a stand-alone example that triggers this behavior? e.g. an open source repo, a minimal reproduction example file and instructions of what to type where so that I can try and reproduce.

I also want to point you in the direction of debug: open language server log from the command palette. From there you can open the rust-analyzer RPC logs and see what data Zed is getting in the textDocument/completion response.

@notpeter notpeter added the awaiting info Issue that needs more information from the user label Feb 18, 2025
@xzbdmw
Copy link
Contributor Author

xzbdmw commented Feb 19, 2025

running rustup default nightly to switch to newer rust-analyzer version

pub fn test(){
    let x = vec![1,2,3];
    x.iter
}
Image

This is related to rust-lang/rust-analyzer#18992, I think zed assumes function/method only has one pair, in other words, there is no look ahead for possible function chains when reconstruct the label.

@notpeter notpeter added rust Rust programming language support and removed awaiting info Issue that needs more information from the user labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Rust programming language support
Projects
None yet
Development

No branches or pull requests

2 participants