Skip to content

Prune import statement symbols #215

Open
@sir4ur0n

Description

@sir4ur0n

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions