vim-hcl icon indicating copy to clipboard operation
vim-hcl copied to clipboard

Add support for syntax based folding

Open droustchev opened this issue 5 years ago • 5 comments

Hi there,

Thanks for this great plugin. I've been working in long Nomad HCLs and missed being able to fold sections based on syntax highlighting. I took the liberty to add this to your syntax file, and also made some other minor changes. Let me know if you'd be interested to incorporate them. I've tested my changes manually against a few of the fixtures in the official hcl repo. Here are some screenshots of the folding in action as well as the changes to the highlighting, albeit with my colorscheme:

Screen Shot 2020-07-10 at 2 58 18 PM Screen Shot 2020-07-10 at 2 58 36 PM

droustchev avatar Jul 10 '20 19:07 droustchev

I was just about to implement and submit my own MR for block names and variables, awesome to see you beat me to it @droustchev! It looks good.

@jvirtanen Any ideas when you will have some time to review and merge this?

mbillow avatar Aug 23 '20 21:08 mbillow

Hi @droustchev and @mbillow! My apologies, I missed this pull request when it was initially opened. I will take a look at this today.

jvirtanen avatar Aug 24 '20 08:08 jvirtanen

Thanks for the feedback @jvirtanen. I have been a bit swamped at work lately, so haven't gotten around to look into making the requested changes. I hope to get around to them this weekend.

droustchev avatar Sep 11 '20 21:09 droustchev

I just stumbled upon this and would also be interested in seeing syntax-based folding land in this plugin. @droustchev do you think you could push the requested changes?

antoineco avatar Feb 12 '21 12:02 antoineco

I could possibly try to look into this myself as well. This was my first real Vim plugin, and I just released another, which forced me to up my Vimscript game. 🙂

jvirtanen avatar Feb 19 '21 07:02 jvirtanen