-
Notifications
You must be signed in to change notification settings - Fork 50
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
ifdef/
else/`endif folding
#142
Comments
Hi @eng-tp, I dug into this, and it appears to be a limitation of the vscode language configuration. You are right, It seems like we would need to implement a registerFoldingRangeProvider like this extension does, as it supports If you want to play around with this yourself, you can follow the contributing guide to download the git repo and run the extension in the debugger. |
Another potential solution is to install this extension and configure it to support |
Hi @joecrop, Thanks for your comments. I will see if I can find the time to experiment with the git repo. In any case, to me a quick & dirty fix would be to remove the else/elsif from both the begin and end patterns, leaving just the ifdef/ifndef as begin, and endif as end - it would fold everything inside the same ifdef/endif, but it would be much better than the current behavior. If I can try this out and get it to work, I'll let you know. Cheers, |
Hi,
I'm seeing issues with folding whenever ifdef/endif pairs have else or elsif directives in between them.
These issues persist even when defining the foldingStrategy as indentation.
E.g.:
Looking at the languageSettings.json file for systemverilog, I see that:
I can't say whether any of these is responsible for the indentation failure - but I assume it's the latter -, and I also don't know how I can experiment with this locally: I am a new user to VSCode and its extensions, and it seems I can't edit the languageSettings.json file for the systemverilog extension locally - or I don't know how to do it...
This seems related with #65 , but that issue was closed and this behavior persists.
Can you please help me in figuring this out?
Thanks, and BR
P.S.: all tick chars were removed due to formatting issues, but you get the point :)
The text was updated successfully, but these errors were encountered: