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

Languages.hcl terraform semantic highlights #6081

Merged

Conversation

lkishalmi
Copy link
Contributor

This change removes the mostly redundant TerraformLexer grammar, which added a few keywords of Terraform dialect of HCL.

The coloring is done by the real Terraform specific structure analyzer. There are room for improvements, especially when I'd finish the expression part of the AST, but let's do baby steps.

@lkishalmi lkishalmi added the HCL label Jun 15, 2023
@lkishalmi lkishalmi added this to the NB19 milestone Jun 15, 2023
@lkishalmi
Copy link
Contributor Author

So added a few features in the last commit:

  • Added a group separator coloring option for {} and []
  • Terraform Declaration blocks (I could not find the correct term for root level blocks) got recognized, their ID is bold now
  • Terraform attribute names highlighted as fields
  • Added Tabs and Insert formatting to the Options dialog, unfortunately does not really work without a formatter.
  • Added code samples to the Options dialog

@lkishalmi
Copy link
Contributor Author

image

@lkishalmi lkishalmi force-pushed the languages.hcl-terraform-semantic-highlights branch from 1089634 to 089d2c3 Compare June 20, 2023 14:06
Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Looks sane to me.

@lkishalmi lkishalmi merged commit fb9e029 into apache:master Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants