Skip to content

Why doesn't CompletionItem for std::thread include additionalTextEdits? #19665

@jm-observer

Description

@jm-observer

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-supportCategory: support questions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions