-
-
Notifications
You must be signed in to change notification settings - Fork 399
Closed
Labels
status: blockedNot actionable, because blocked by upstream/GHC etc.Not actionable, because blocked by upstream/GHC etc.type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Description
Is your enhancement request related to a problem? Please describe.
Currently, calling textDocument/references
on the field of a record in a definition returns way too many things, including all of the other record fields, as well as the data type definition line, as well as some seemingly duplicate entries. Example:
For this file
{-# LANGUAGE RecordWildCards #-}
data Foo = MkFoo
{
bar :: Int,
baz :: String
}
fooUse0 :: Foo -> Int
fooUse0 MkFoo{bar} = 5
fooUse1 :: Foo -> Int
fooUse1 MkFoo{..} = 6
fooUse2 :: Int -> String -> Foo
fooUse2 bar baz =
MkFoo{..}
Calling textDocument/references
while my cursor is on bar
on line 4 returns the following results:
A lot of these seem redundant:
- The constructor definition (the last result)
- Some of the lines are seemingly duplicated -
fooUse1
andfooUse2
are both seemingly mentioned twice, which seems like a bug? - (my biggest issue)
baz :: String
also comes up as a result, which also seems like a bug, and is a huge pain when dealing with Real World ™️ data types with loads of fields, as this happens for each field.
Describe the solution you'd like
I would like for only lines that mention the field in question to show up.
Describe alternatives you've considered
Maybe I'm just confused regarding what "references" means?
Metadata
Metadata
Assignees
Labels
status: blockedNot actionable, because blocked by upstream/GHC etc.Not actionable, because blocked by upstream/GHC etc.type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..