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

Import bug, suggestion PRAGMA's not submodules #3617

Closed
sixfourtwelve opened this issue May 31, 2023 · 7 comments
Closed

Import bug, suggestion PRAGMA's not submodules #3617

sixfourtwelve opened this issue May 31, 2023 · 7 comments
Assignees
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. ZuriHac This issue is suitable for ZuriHac Hacking sessions

Comments

@sixfourtwelve
Copy link

Your environment

Which OS do you use?
MacOS M1 Pro Ventura 13.2

Which version of GHC do you use and how did you install it?
Via GHCUP

GHC 9.6.1 (base-4.18.0.0) happens with 9.2.7 also
Cabal 3.6.20
Stack 2.9.3

How is your project built (alternative: link to the project)?
Cabal

Which LSP client (editor/plugin) do you use?
Neovim with Coc
gist example of the language server setup

Which version of HLS do you use and how did you install it?
HLS 2.0.0.0 from GHCUP, also happens with 1.10.0.0

Have you configured HLS in any way (especially: a hie.yaml file)?
Only Coc setup

Steps to reproduce

Create a project via cabal init, go to app/Main.hs, proceed to import a module, such as Data.List or Control.Concurrent

Expected behaviour

Provide only suggestions for submodules

Actual behaviour

Whilst pressing . to access the submodule, PRAGMA's are suggested, such as, LANGUAGE, OPTIONS_GHC, then the submodules are at the bottom of the suggestion list

image

@sixfourtwelve sixfourtwelve added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels May 31, 2023
@L0neGamer
Copy link

Not sure if this would constitute a different ticket, but I get similar behaviour after any ., such as in comments.

The adjustment I would recommend (and I understand it may not be easy at all) is to completely disallow pragma completion unless it's in a pragma context, by which I mean {-# we are in here #-}. People don't need pragma recommendations by and large, and if they do they should know that they need to write the above syntax to start writing a pragma.

@fendor fendor added ZuriHac This issue is suitable for ZuriHac Hacking sessions and removed status: needs triage labels May 31, 2023
@michaelpj
Copy link
Collaborator

This should definitely not happen, and I don't think it used to 🤔

@akshaymankar
Copy link
Contributor

I will work on this during ZuriHac.

@sixfourtwelve
Copy link
Author

@akshaymankar I believe @fendor is working on it? he can correct me if not :)

@fendor
Copy link
Collaborator

fendor commented Jun 10, 2023

I am not working on it, I was just adding the zurihac label, so this is free for the taking :)

@fendor
Copy link
Collaborator

fendor commented Jun 14, 2023

Closed by #3647

@fendor fendor closed this as completed Jun 14, 2023
@sixfourtwelve
Copy link
Author

Thanks @fendor and @akshaymankar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. ZuriHac This issue is suitable for ZuriHac Hacking sessions
Projects
None yet
Development

No branches or pull requests

5 participants