You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users should be shown tooltips with additional information when hovering over parts of their source code when using an LSP client, such as the vscode plugin.
Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered:
# Description
## Problem
Resolves#1575
## Summary
Implements LSP hover for:
- modules
- structs
- struct members
- traits
- global variables
- functions
- aliases
- local variables
The popup content is similar to that of Rust Analyzer except that
there's no link to go to that reference. The reason is that it seems the
LSP type to do that has an "actions" property but I can't find that in
the lsp-types library we are using. That said, once this PR is merged
doing that should be relatively easy, and it might be better to keep PRs
smaller.
There's one case where the hover doesn't work: if you have `let x: i32 =
Default::default();`, hovering over `default` won't show the impl
function. It's doable, but doing it requires more changes in this PR and
at one point I wanted to stop :-)
This PR also includes several fixes that I found in
"find-all-references" and "rename", but because hover and those are all
kind of related, and testing things for hover is simpler, I decided to
add tests for those things and fix them.
Here it's in action:
https://github.com/noir-lang/noir/assets/209371/bb64d368-2cf7-450c-99f3-e2aba52ca4e3
## Additional Context
None.
## Documentation\*
Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.
# PR Checklist\*
- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
---------
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Problem
The LSP should support hover requests following https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_hover
Happy Case
Users should be shown tooltips with additional information when hovering over parts of their source code when using an LSP client, such as the vscode plugin.
Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: