nwolverson / purescript-language-server

MIT License
184 stars 41 forks source link

Go to def is not working for imported type constructors #145

Open wclr opened 3 years ago

wclr commented 3 years ago

Having type data constructors imported:

import Data.Maybe (Maybe(..))
import Data.Maybe as Maybe

If to use just imported constructors without a namespace (Just, Nothing) one cannot go to definition, though if to use namespaced version (Maybe.Just) go to definition can be triggered.

x = Just 1 -- <- can NOT go to `Just` defintion, 

y = Maybe.Just 2 -- <- can go to `Just` defintion

Isn't possible to implement it currently?

nwolverson commented 3 years ago

Oh it's not just go to definition, hover tooltips are not showing for type constructors either. I think this is a regression.

wclr commented 3 years ago

It works if the type is defined in the same module, does not for external types, so maybe it is not a regression.