It is rather a feature request. When you come up with you own language, the community will demand support for features like syntax coloring and intellisense, sooner or later.
This is such request. Other editors already support it and the parser is open source, so adding Eclipse plugin doesn't seem a lot of work, but naturally requires resources.
Terraform v0.11.3
Irrelevant
N/A
N/A
Eclipse editor should present a nicely colored and pretty looking, properly formatted page with Terraform script.
Boring grey lines with no anchors for an eye and chances to write buggy scripts
Open Terraform script in Eclipse editor
This might be very helpful:
https://github.com/VladRassokhin/intellij-hcl
Dunno. You comment :)
+1
This is a few months ago. Has this been implemented?
There are some significant changes to the language grammar coming in the next major release, so any highlighting definition written today will certainly need to be updated after that release. For that reason, we (the Terraform team at HashiCorp) don't intend to invest in editor support work until at least that work has completed and the new language syntax can be incorporated.
As a matter of prioritization, it is likely that a TextMate-style grammar will be the first definition to be completed and supported, since that format is a de-facto standard across many different editors. It appears that Eclipse can support this via tm4e.
+1
+1
well, +1
+1
Although not yet well-tested and complete, there are work-in-progress TextMate grammars available in the repository of the new language engine.
As noted before, the priority for right now is getting the release actually shipped, but once it has been it'll be a good time to work on solidifying these grammar definitions and packaging them up as part of text editor and IDE extensions.
In the mean time, various editors already have highlighting support available for the 0.11-and-prior language, many of which are based on TextMate grammars written by third-parties that can potentially be ported to other editors with TextMate grammar support.
Hi all!
We had originally intended to address the general need of integrating Terraform language support into text editors (for editors in general, not for Eclipse in particular) by implementing the Language Server Protocol, and we had implemented an initial prototype of it. But before we could finish it, we were beaten to it and now there is terraform-lsp, a third-party language server implementation.
Eclipse support for the Language Server Protocol is apparently already available, so the building blocks are available for rich language support in Eclipse and any other editor with LSP support.
The Terraform team discussed the plans for terraform-lsp with its author and concluded that we'd leave that project to evolve independently, since the featureset there is already very rich and it being a separate project seems to be helping a lot with the development velocity. At some point in the future we may want to discuss bringing the core LSP functionality into Terraform itself so that we can maintain it in lockstep with any changes to the language, but that's not an urgent need at the moment.
With that said, we're going to close this issue because for the moment it'd be better to have any further discussion about this in the context of the terraform-lsp project. LSP doesn't include syntax highlighting, but as I mentioned previously there are already TextMate grammars for HCL which can be used as a basis for Terraform highlighting support, in conjunction with the language server.
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 details necessary to investigate further.
Most helpful comment
There are some significant changes to the language grammar coming in the next major release, so any highlighting definition written today will certainly need to be updated after that release. For that reason, we (the Terraform team at HashiCorp) don't intend to invest in editor support work until at least that work has completed and the new language syntax can be incorporated.
As a matter of prioritization, it is likely that a TextMate-style grammar will be the first definition to be completed and supported, since that format is a de-facto standard across many different editors. It appears that Eclipse can support this via tm4e.