Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP: autocompletion types in import statement should account for already-typed type keyword #3244

Closed
quentin-fox opened this issue Jun 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@quentin-fox
Copy link

quentin-fox commented Jun 4, 2024

On Gleam 1.2:

When autocompleting an unqualified type import, the LSP always inserts the type prefix before.

e.g. when triggering autocomplete for Dict from here:

import gleam/dict.{type D }
                         ^

We end up with

import gleam/dict.{type type Dict}

Another related bug:

If type is already typed in the import statement, it should ideally only allow autocompletion of available types, instead of all exported symbols.

e.g.

import gleam/dict.{type }
                       ^

The get function is one of the suggestions, when the LSP should know (? unless that's not desired behaviour) that I'm only looking to import types.

@quentin-fox quentin-fox added the bug Something isn't working label Jun 4, 2024
@lpil
Copy link
Member

lpil commented Jun 4, 2024

Closing as duplicate

@lpil lpil closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants