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

lsp: handle textDocument/documentSymbol #668

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Conversation

anderseknert
Copy link
Member

More weekend fun! This provides a basic implementation of textDocument/documentSymbol. I say basic because we currently scan for nested symbols, but only package, rules and functions, with some nice touches like providing details on what kind of rule it is, and the type it returns, and so on. I think this covers what most actually need, but we can certainly refine this later and add things like variables inside of rule bodies, and so on.

Screenshot 2024-04-22 at 12 21 07

Copy link
Member

@charlieegan3 charlieegan3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really nice! great feature and the implementation was easy to follow too! 🏁

More weekend fun! This provides a basic implementation of `textDocument/documentSymbol`.
I say basic because we currently scan for nested symbols, but only package, rules and
functions, with some nice touches like providing details on what kind of rule it is, and
the type it returns, and so on. I think this covers what most actually need, but we can
certainly refine this later and add things like variables inside of rule bodies, and so on.

Signed-off-by: Anders Eknert <[email protected]>
@anderseknert anderseknert merged commit 2a59305 into main Apr 22, 2024
3 checks passed
@anderseknert anderseknert deleted the document-symbol branch April 22, 2024 12:33
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
More weekend fun! This provides a basic implementation of `textDocument/documentSymbol`.
I say basic because we currently scan for nested symbols, but only package, rules and
functions, with some nice touches like providing details on what kind of rule it is, and
the type it returns, and so on. I think this covers what most actually need, but we can
certainly refine this later and add things like variables inside of rule bodies, and so on.

Signed-off-by: Anders Eknert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants