Hi, I'm developing a client that integrates with rust-analyzer, and I'm handling CompletionItem insertions.
When I complete something like thread, I get a CompletionItem that includes this field:
"data": {
"imports": [{ "full_import_path": "std::thread" }]
}
However, the CompletionItem doesn't include any additionalTextEdits to insert use std::thread;.
My client does send completionItem.resolveSupport.properties = ["additionalTextEdits"], and I also call completionItem/resolve as needed.
Is this intentional behavior? Under what conditions does rust-analyzer decide to provide additionalTextEdits instead of data.imports? Should clients always handle data.imports themselves?
Thanks!
Hi, I'm developing a client that integrates with
rust-analyzer, and I'm handlingCompletionIteminsertions.When I complete something like
thread, I get aCompletionItemthat includes this field:However, the
CompletionItemdoesn't include anyadditionalTextEditsto insertuse std::thread;.My client does send
completionItem.resolveSupport.properties = ["additionalTextEdits"], and I also callcompletionItem/resolveas needed.Is this intentional behavior? Under what conditions does rust-analyzer decide to provide
additionalTextEditsinstead ofdata.imports? Should clients always handledata.importsthemselves?Thanks!