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

HLS Completion Scope #3798

Closed
feedseed opened this issue Sep 9, 2023 · 4 comments
Closed

HLS Completion Scope #3798

feedseed opened this issue Sep 9, 2023 · 4 comments
Labels
status: needs info Not actionable, because there's missing information type: support User support tickets, questions, help with setup etc.

Comments

@feedseed
Copy link

feedseed commented Sep 9, 2023

Description

Howdy, I was wondering whether it is possible to restrict the scope of completion items to the current scope/namespace of the file/project one is currently working in. Whenever I work on a project, an unhinged list of completions is presented to me, consisting of all functions that are defined somewhere in the modules I have installed. Unfortunately, I just want to see the stuff I have imported, not every other library I am not using that makes completion completely useless. Also, is there no way to assign a priority to a completion?

Doesn't work in project mode, nor single file mode.

I tried to find some information on this subject, but until now, I couldn't get it to work.

Environment

Void Linux, Installed Haskell tool chain using GHCup, neovim with LSPconfig.

@feedseed feedseed added status: needs triage type: support User support tickets, questions, help with setup etc. labels Sep 9, 2023
@fendor
Copy link
Collaborator

fendor commented Sep 9, 2023

Hi, thank you for your bug report!

Potentially related to #3646

However, we try to avoid too many config options since they are one additional code path to test and maintain.

Perhaps we can simply sort the completions better, coming up with better heuristics to decide the order. The order of the completions is lsp-client dependent, iirc, but we can supply a custom comparison string https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_completion

@michaelpj
Copy link
Collaborator

I'm pretty sure we already sort the completions and use the comparison string so that local completions are first 🤔

@fendor fendor added status: needs info Not actionable, because there's missing information and removed status: needs triage labels Oct 18, 2023
@fendor
Copy link
Collaborator

fendor commented Oct 18, 2023

not every other library

Library your project depends on? Or in the case of single Haskell files, GHC boot libraries?

This bug report sounds a little bit unclear, can you perhaps provide an example of what's going on?

@michaelpj
Copy link
Collaborator

Never got a reply here, so closing

@michaelpj michaelpj closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs info Not actionable, because there's missing information type: support User support tickets, questions, help with setup etc.
Projects
None yet
Development

No branches or pull requests

3 participants