Closed jrudess closed 5 years ago
It may be better to leave // comment-block folding out of the base syntax files, and instead an example use case for g:verilog_syntax_custom could show the regex. Either in the README, or next to the spyglass example in the docs.
Submitted some changes that will help the test case pass in that scenario.
I've tried your comment code but it's currently conflicting with the g:verilog_syntax_custom
used in the folding tests. Need more time to look into that.
I added an example to the documentation with your code. The change you are proposing would conflict with other foldings I use daily, so I decided against it. Basically we would be creating a syntax region for every individual line comment and this would break other syntax regions that depend on line comments (as is the example I already provided in the documentation for SpyGlass pragmas, that is also part of test cases).
I stored my changes in a local branch, so nothing is lost if I find a way of implementing this in the future :)
Thanks for your help!
When enabling // comment-block folding, the folding.sv test case is impacted due to usage of // comments on the end of every line.
The new syntax definition is here
And the test-case errors are like this:
The // comments that get folded have fold level increased by 1., causing most of the errors listed.
The assign statement line is due to run_test.vim defining a custom
spyglass
syntax to fold the contents of a spyglass disable/enable comment block. The new // comment-block fold interfers with this custom rule due to having a // comment on the prior line.Should the // comment-block folding build in an exception for this spyglass case?