haskell-language-server
haskell-language-server copied to clipboard
Prune import statement symbols
It's been a long time since my last issue :stuck_out_tongue:
Currently HLS considers each import statement as a symbol, which has several minor inconveniences, e.g.:
-
Go to symbolis spammed with import statements, which - I think - almost nobody will ever use -
Go to Next Memberstops at eachimportstatement, 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

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?
Is it possible without breaking the highlighting an appropriate import statement when a caret is on the symbol's usage?