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

textDocument/documentSymbol: Support nested symbols #420

Merged
merged 1 commit into from
Feb 25, 2021

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Feb 24, 2021

Closes #290

In terms of supported symbol kinds this is still limited to only primitive types for now. It would be probably weird not to display an attribute at all just because we don't know its type, so we fall back to a generic Variable kind in such cases.

hashicorp/hcl-lang#16 brings some initial expression support which we can later use to improve the symbol navigation accuracy.

Example

Before

Screenshot 2021-02-24 at 11 28 42

After

Screenshot 2021-02-24 at 11 29 24

@radeksimko radeksimko requested a review from a team February 24, 2021 11:30
Copy link
Contributor

@aeschright aeschright left a comment

Choose a reason for hiding this comment

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

LGTM

@radeksimko radeksimko merged commit 71829ab into main Feb 25, 2021
@radeksimko radeksimko deleted the f-nested-symbols branch February 25, 2021 08:01
@ghost
Copy link

ghost commented Mar 27, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide navigation for nested symbols (blocks/attributes)
2 participants