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

Fix highlighting of nested complex types #20

Merged
merged 3 commits into from
Mar 18, 2022
Merged

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Mar 17, 2022

This PR updates the HCL and the Terraform grammar to fix the highlighting of nested complex types.

Before

CleanShot 2022-03-17 at 13 01 08@2x

before-hcl

After

CleanShot 2022-03-17 at 13 00 29@2x

after-hcl

Closes #19

dbanck added 3 commits March 17, 2022 12:43
This also removes the incomplete definition for structural types,
which failed to highlight nested structures correctly. We now only
rely on highlighting through the type keywords.
This also removes the incomplete definition for structural types,
which failed to highlight nested structures correctly. We now only
rely on highlighting through the type keywords.

Furthermore, we don't want to highlight list and map as functions,
so those keywords are removed from the functions list.
@dbanck dbanck added the bug Something isn't working label Mar 17, 2022
@dbanck dbanck added this to the 0.2.0 milestone Mar 17, 2022
@dbanck dbanck requested a review from a team March 17, 2022 12:03
@dbanck dbanck self-assigned this Mar 17, 2022
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix and for detailed & useful commit messages, and (as always) for the screenshots.

@dbanck dbanck merged commit 1942556 into main Mar 18, 2022
@dbanck dbanck deleted the b-nested-complex-types branch March 18, 2022 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

syntax: Broken highlighting of nested complex types within object({ ... })
2 participants