Resolve completions properly (#18212)

Related to https://github.com/rust-lang/rust-analyzer/pull/18167

* Declare more completion item fields in the client completion resolve
capabilities
* Do resolve completions even if their docs are present
* Instead, do not resolve completions that could not be resolved when
handling the remote client resolve requests
* Do replace the old lsp completion data with the resolved one

Release Notes:

- Improved completion resolve mechanism
This commit is contained in:
Kirill Bulatov 2024-09-23 12:53:57 +03:00 committed by GitHub
parent bb7d9d3525
commit 05d18321db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 35 additions and 11 deletions

View file

@ -615,8 +615,14 @@ impl LanguageServer {
snippet_support: Some(true),
resolve_support: Some(CompletionItemCapabilityResolveSupport {
properties: vec![
"documentation".to_string(),
"additionalTextEdits".to_string(),
"command".to_string(),
"detail".to_string(),
"documentation".to_string(),
"filterText".to_string(),
"labelDetails".to_string(),
"tags".to_string(),
"textEdit".to_string(),
],
}),
insert_replace_support: Some(true),