-
Notifications
You must be signed in to change notification settings - Fork 822
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
Added basic line indenting to HCL languages. #6127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly sane to me. I have one problem with this: It introduces trailing whitespace on empty lines. I noticed this when I tested this with the example.tf
file. It looked (and is) well indented, yet the file becomes modified, because the empty lines in the blocks get space injected.
ide/languages.hcl/src/org/netbeans/modules/languages/hcl/BasicHCLLexer.java
Outdated
Show resolved
Hide resolved
Thanks for reporting that! I'm working on some tests, as some of the (edge) cases might be not handled well. And now I wish we have Java 17 Textblocks... |
a115ad9
to
9de8441
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eyeballed this and looks sane to me. My tests, though limited, worked ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go for it, @lkishalmi !
Making HCL editing a bit easier...