Hovering on a record field defined several times will only show the information for the first definition
Describe the bug
In the LSP, hovering over a record field will show some information on that field if there's any:
However, if the field is defined more than once, only the first one will get a useful information on hover:
To Reproduce
On the following file:
{ foo, foo } | { foo | doc "The field Foo" }
Hover on the second foo
Expected behavior
Both instances of the field should display the full information on hover
Environment
- OS name + version:
- Version of the code: f5b5876
Additional context
I looked into this a little. The issue is that when converting from UniRecord to RichTerm the duplicate fields are merged. So by the time nls gets its hands on the AST, it only sees one of the foos as a field definition. I think to solve this, nls would need to get its hands on the UniTerm AST.