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

Prune import statement symbols #215

Open
sir4ur0n opened this issue Jul 21, 2020 · 0 comments
Open

Prune import statement symbols #215

sir4ur0n opened this issue Jul 21, 2020 · 0 comments
Labels
component: ghcide level: easy The issue is suited for beginners type: enhancement New feature or request

Comments

@sir4ur0n
Copy link
Collaborator

It's been a long time since my last issue 😛

Currently HLS considers each import statement as a symbol, which has several minor inconveniences, e.g.:

  • Go to symbol is spammed with import statements, which - I think - almost nobody will ever use
  • Go to Next Member stops at each import statement, while the whole point is to quickly navigate in the file

I just checked how it's done e.g. with Java files: import statements are not even symbols.

Concrete example:

module Foo where

import Prelude
import Data.Text
import GHC.Generics
import GHC.Arr

foo :: ()
foo = ()

bar :: ()
bar = ()

data Foo

newtype Bar = Bar Foo

class Baz a

instance Baz Foo

image

As you can see, there is a symbol for the module declaration, another for "the group of imports" (which I find awesome), in my opinion there is no benefit to also consider each import statement as a symbol.

What do you think?

@michaelpj michaelpj added level: easy The issue is suited for beginners good first issue labels May 30, 2022
@michaelpj michaelpj added level: easy The issue is suited for beginners and removed level: easy The issue is suited for beginners old_good first issue labels Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ghcide level: easy The issue is suited for beginners type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants