Closed wcarlsen closed 2 years ago
Hey @wcarlsen ,
i suppose its related to the queries in nvim treesitter ( https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/hcl/indents.scm for reference ). Ill have a look if the queries fit the syntax tree in the evening. A block_end
should have triggered the indentation level to decrease i suppose in this case! ( but the block_end was highlighted correctly! so it could be a nvim-treesitter issue intuitively. )
Hey,
Ill have to defer to the weekend have no time to update my nvim-treesitter setup to play with the queries. Its most certainly an issue with the queries for hcl there. Would you mind opening the issue there again?
Sure I will try that.
Are you fine with closing this here since it is handled by nvim-treesitter? If something in this repo prevents the work in nvim-treesitter we can reopen of course
Sure thing!
Describe the bug When adding new line auto indent works great when inside a block, but when outside of a block it also auto indent when new line is added.
To Reproduce Steps to reproduce the behavior:
:TSInstall hcl
Expected behavior I expect auto indent not to happen out side Terraform blocks.
Screenshots Hard to show on screenshots. But here is an attempt. See it on line 5.
Additional context Also disabling indent makes it work outside Terraform blocks, but breaks indentation inside blocks.