Skip to content

x/tools/gopls: report if accepting a completion item will result in auto-import #70975

Description

@xzbdmw

gopls version

0.17.1

go env

..

What did you do?

"os" is not yet imported:
image

however, strings are already imported:
image

What did you see happen?

They looks the same.

What did you expect to see?

Show a hint whether a package is going to be auto-imported, because some package names look similar, I want to use an already imported one, but find myself often accept a wrong name, therefor need to undo auto import.

In clangd, there is a little circle indicating this:
image

after accpeting printf, the circle disappears, because stdio.h is auto imported
image

Editor and settings

No response

Logs

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

FeatureRequestIssues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions