Skip to content

[display] import completion: suggest qualified paths for unqualified type prefixes#12981

Merged
Simn merged 1 commit into
developmentfrom
fix/import-completion-toplevel
Jul 5, 2026
Merged

[display] import completion: suggest qualified paths for unqualified type prefixes#12981
Simn merged 1 commit into
developmentfrom
fix/import-completion-toplevel

Conversation

@kLabz

@kLabz kLabz commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

import Fo| and using Fo| fell into legacy type path completion, which only lists root-package modules. Raise a toplevel CRImport collection instead, so clients can suggest pack.to.Foo (and module sub-types, e.g. Ba| -> pack.to.Foo.Bar) with fully-qualified insert text. Qualified prefixes (import pack.Fo|) keep the package-scoped listing.

…type prefixes

`import Fo|` and `using Fo|` fell into legacy type path completion,
which only lists root-package modules. Raise a toplevel CRImport
collection instead, so clients can suggest `pack.to.Foo` (and module
sub-types, e.g. `Ba|` -> `pack.to.Foo.Bar`) with fully-qualified
insert text. Qualified prefixes (`import pack.Fo|`) keep the
package-scoped listing.
@Simn

Simn commented Jul 5, 2026

Copy link
Copy Markdown
Member

I remember fighting Nicolas about this because he insisted on this kind of legacy completion that only shows root packages in imports. I don't know is this is still a point of contention though.

@kLabz

kLabz commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

We have this behavior pretty much everywhere else, and actually using completion somewhere else with auto imports ON is the current workaround for importing types with long package names, which looks pretty stupid.. 😅

@Simn

Simn commented Jul 5, 2026

Copy link
Copy Markdown
Member

Yeah well, let's just see what happens!

@Simn Simn merged commit 957b2c7 into development Jul 5, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants