Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hovering on a record field defined several times will only show the information for the first definition #1971

Open
thufschmitt opened this issue Jun 20, 2024 · 1 comment

Comments

@thufschmitt
Copy link
Contributor

Describe the bug

In the LSP, hovering over a record field will show some information on that field if there's any:

image

However, if the field is defined more than once, only the first one will get a useful information on hover:

image

image

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

@jneem
Copy link
Member

jneem commented Jul 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants