Why doesn't CompletionItem for std::thread include additionalTextEdits? #19998
Replies: 5 comments 1 reply
-
No, clients should never use anything in |
Beta Was this translation helpful? Give feedback.
-
Does the completion item change after the |
Beta Was this translation helpful? Give feedback.
-
Someone reported the following issue for the LSP Sublime text client: "Importing types via auto-complete sometimes doesn't import the type" I initially thought that it was a client bug,
|
Beta Was this translation helpful? Give feedback.
-
For Sublime Text the issue is on the editor side IMO as it doesn't wait for Maybe your client @jm-observer also makes a similar mistake? The completion should ideally be resolved before triggering a completion. Triggering another |
Beta Was this translation helpful? Give feedback.
-
It took a bit too long, but after testing, there are no issues with my client either. Thank you all! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm developing a client that integrates with
rust-analyzer
, and I'm handlingCompletionItem
insertions.When I complete something like
thread
, I get aCompletionItem
that includes this field:However, the
CompletionItem
doesn't include anyadditionalTextEdits
to insertuse std::thread
;.My client does send
completionItem.resolveSupport.properties = ["additionalTextEdits"]
, and I also callcompletionItem/resolve
as needed.Is this intentional behavior? Under what conditions does rust-analyzer decide to provide
additionalTextEdits
instead ofdata.imports
? Should clients always handledata.imports
themselves?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions