-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
LSP: Resolve completion items when any info is missing #10873
Conversation
I think we likely need to do something similar for detail and documentation. I think this is a case where null and empty list/empty string satsify the same condition in vscode/JavaScript so a lot of lsps usw them interchangibly |
Rust-analyzer for example sends `Some([])` for completion items and then sends the actual additional text edits in the completionItem/resolve response. To be defensive we also guard against language servers sending empty details and documentation.
fe3b99f
to
f71cee8
Compare
|| item.item.detail.is_none() | ||
|| item.item.additional_text_edits.is_none(); | ||
if !needs_resolve { | ||
// We consider an item to be fully resolved if it has non-empty, none-`None` details, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is none-
supposed to be non-
? Or is this implying something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep that's a typo, should be "non-None
"
Rust-analyzer for example sends
Some([])
for completion items and then sends the actual additional text edits in the completionItem/resolve response.Fixes #10787