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

Let LSP "go to definition" work in path segments #5405

Closed
asterite opened this issue Jul 3, 2024 · 0 comments · Fixed by #5406
Closed

Let LSP "go to definition" work in path segments #5405

asterite opened this issue Jul 3, 2024 · 0 comments · Fixed by #5406
Labels
enhancement New feature or request

Comments

@asterite
Copy link
Collaborator

asterite commented Jul 3, 2024

Problem

"Go to definition" currently doesn't work for path segments. For example if you have use foo::bar and click on foo, it doesn't take you to the foo module. Similarly, if you have a call like foo::bar(), clicking on foo doesn't do anything. Then, if you have mod foo;, clicking on foo doesn't do anything either.

Happy Case

Clicking on any part of a path, be it in a mod statement, use statement, a call or a reference to a type, etc., should take you to the module declaration. This should work both for modules declared in a file as well as inline modules (mod foo { ... }).

Project Impact

None

Impact Context

No response

Workaround

None

Workaround Description

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

Yes

Support Needs

No response

@asterite asterite added the enhancement New feature or request label Jul 3, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 4, 2024
# Description

## Problem

Resolves #5405

## Summary

Now clicking on module segments works as expected.


https://github.com/noir-lang/noir/assets/209371/e8968eea-ad0b-4d85-9500-db31e46009a0

## Additional Context



## 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>
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
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant