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

Add hover support for warning attributes #717

Open
ulugbekna opened this issue Jun 11, 2022 · 1 comment
Open

Add hover support for warning attributes #717

ulugbekna opened this issue Jun 11, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@ulugbekna
Copy link
Collaborator

A user hovering over [@warning "-27"] could see that this attribute is disabling warning 27 and description of what that warning is

@xvw
Copy link
Collaborator

xvw commented May 29, 2024

To achieve this, you would need to refer to the function integrated via this issue: ocaml/merlin#1775 for linking between warning id and warning description.

The hover functionality is a standard LSP request, specified here. On the ocaml-lsp-server side, the functionality is implemented in the Hover_req module. The entry point is the hover_at_cursor function. which iterates over each element of the AST. The aim of the issue is to add a case for the attributes identified by @warning and to use their index to return a textual formatting, which will be provided via the function added via ocaml/merlin#1775.

Feel free to ask more clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants