Skip to content

fix: properly tokenizes default_tags attribute #1068

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

Merged

Conversation

esacteksab
Copy link
Contributor

In the current version default_tags was getting processed like

{"type":"NameAttribute","value":"default"},
{"type":"Error","value":"_"},
{"type":"NameOther","value":"tags"}

but default_tags is a valid attribute or parameter here and doesn't need parsed as such. This matches default_tags properly

Here is the before
default_tags_2_16_capture

And the after with this change
fixed-default_tags-capture

Hopefully I did this correctly. I fixed #988 but it's been a minute. Thanks!

@esacteksab
Copy link
Contributor Author

I was playing with this further with tokyonight* themes, they have a lot more <entry> compared to other themes and encountered a few other issues. I hope you don't mind me piling in on this PR.

The before, you can see default_tags, name, partially shaded variable, and values
2-16-variable-values-capture

The after
1068-fixed-capture

@alecthomas
Copy link
Owner

Seems like an improvement, thanks!

@alecthomas alecthomas merged commit 9077658 into alecthomas:master Apr 16, 2025
2 checks passed
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.

Dot in a string breaks the highlighting in Terraform
2 participants