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

Various scope adjustments to ST Terraform syntax #58

Merged
merged 11 commits into from
Aug 7, 2024
Merged

Various scope adjustments to ST Terraform syntax #58

merged 11 commits into from
Aug 7, 2024

Conversation

FichteFoll
Copy link
Member

@FichteFoll FichteFoll commented Jul 24, 2024

Trying out the syntax for the first time, I couldn't help but notice that several wrong colors were being used to highlight text, which was caused by questionable, non-standard or outdated scope names.

The commits included in this PR should mostly stand on their own, i.e. I can be cherry-picked or omitted if desired, though I stand by each change being an improvement.

Note that 843b9bf requires ST4 (but can also just be omitted). Edit: dropped the commit

@FichteFoll FichteFoll changed the title Various scope adjustments to Terraform syntax Various scope adjustments to ST Terraform syntax Jul 24, 2024
@FichteFoll
Copy link
Member Author

Also, in case you're not interested in maintaining this repo anymore, we could also adopt it into the SublimeText org, where we have several people capable of merging pull requests that are also active Sublime Text users.

@FichteFoll FichteFoll mentioned this pull request Jul 24, 2024
@FichteFoll
Copy link
Member Author

FichteFoll commented Jul 24, 2024

I also noticed that some of the punctuation scope changes have actually been like this before but were reverted later in a680585 and e895f03. Since the punctuation scopes are indeed the standardized scope names and have been in use by the default packages, I don't think the arguments mentioned in the commit messages hold anymore (if they ever did).

Also also, I consider the tmLanguage variants of this syntax to be deprecated since ST2 is long gone and I don't want anything to do with them anymore, personally.

It's already in the HCL syntax definition alias.

Was likely incorrectly resolved during
1576c26 after it had been removed in
5d4c9f0.
- Span `meta.string` over the entire string.
- Use `punctuation.section` for interpolation punctuation.
- Highlight `~` operator to trim whitespace only immediately next to the
  section punctuation.
- Set `source.terraform` scope for the interpolation body.
These identifiers (called "variables" by the spec) are semantically not
constants. Instead, they provide access to external value sources and
should thus be scoped as special language variables comparable to the
C-like `this` or Python's `self`.
Scope name was inspired by Python.
`in` is a proper keyword here, not an operator.
Having basically a copy of the test file for the identical terraform
syntax is quite redundant. Instead, only test for a few excerpts of
that syntax to ensure the inclusion works as expected.
@FichteFoll
Copy link
Member Author

I also dropped the commit that uses extends because that also requires ST4 and simplified the tfvars tests a lot, which I totally didn't notice. I just didn't see the point in maintaining two basically identical test files for the basically identical syntax.

@michaelblyons
Copy link

Also, in case you're not interested in maintaining this repo anymore, we could also adopt it into the SublimeText org, where we have several people capable of merging pull requests that are also active Sublime Text users.

In this time of supply chain risk, it's worth making sure that the claims are true regarding package transfer, but FF is legitimate and so is the GitHub org in question.

@FichteFoll FichteFoll added this to the 2.0.0 milestone Aug 7, 2024
@FichteFoll FichteFoll merged commit cff50c9 into SublimeText:master Aug 7, 2024
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.

2 participants