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

Incremental search in import suggestion #1764

Open
konn opened this issue Sep 22, 2020 · 6 comments
Open

Incremental search in import suggestion #1764

konn opened this issue Sep 22, 2020 · 6 comments

Comments

@konn
Copy link
Collaborator

konn commented Sep 22, 2020

Currently, VSCode HLS suggests missing import in the following manner:

スクリーンショット 2020-09-22 12 54 21

For now, one can push the prefix of each item of pulldown to select, but many of items share the long prefix such as import qualified ... or add imports ....
It might be good if one can filter-out the candidate by module name.

@konn konn changed the title Incremental import suggestion Incremental search in import suggestion Sep 22, 2020
@jneira
Copy link
Member

jneira commented Sep 22, 2020

Afaik this should be implemented in the server (i will transfer to haskell-language-server if nobody disagree)

@ndmitchell
Copy link
Collaborator

The Rust extension has a single add import hint. If the import is unambiguous it inserts it. If there is a choice, it pops up a selection in the VS Code super-search bar listing the possible imports, which can be easily searched. I'd prefer that approach.

No idea whether this belongs in HLS or Ghcide - and if we go with the Rust approach, might even be in the extension itself.

@konn
Copy link
Collaborator Author

konn commented Sep 22, 2020

Since the extension already has an access to the completion candidates and scope of changes could stay minimal, I'm +1 for @ndmitchell's idea!

@konn
Copy link
Collaborator Author

konn commented Sep 23, 2020

Hmm, it seems that I misunderstood the situation.
It seems that, currently, ghcide provides each import candidate as separate code action and vscode-haskell doesn't have any access to the intermediate information of missing imports.
So, this feature needs some changes both in ghcide and vscode extension, IIUC.

@jneira
Copy link
Member

jneira commented Sep 23, 2020

Ok, maybe it worths to open an issue to track the needed changes in the backend

@konn
Copy link
Collaborator Author

konn commented Apr 3, 2021

Recently, I've found Keyboard QuickFix extension, which gives us a helm- or Command Palette-like alternative to the native QuickFix contextual menu. So I think this issue can be overcome by using such extensions (though we could provide HLS specific filtering by similar way).

@jneira jneira transferred this issue from haskell/vscode-haskell Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants