-
Notifications
You must be signed in to change notification settings - Fork 17
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
Auto-indentation rules #144
Comments
the AI wants to add I wonder if it's dizzy or actually on to something. I mean would VS Code really add multiple indentations due to matching with It's also saying that |
Also my regex doesn't account for 1 liners and oops, wrong button when replying. |
Indentation rules require more investigation. Single regular expressions don't handle all edge cases properly. Meanwhile, v0.22.0 adds Besides, #118 has always been on the todo-list. |
Oh I missed that issue but I'll give the 0.22.0 version a go and if some of them work then I'm good. |
I've noticed that currently there isn't any auto-indentation rules for Sugarcube 2 at least. Unless I'm wrong and they're in one of the configuration files. I was thinking just for the built in macros that Sugarcube has for now. Since you can add your own, I have my own that I've added in there but I'm not much of regex wizard so the indentation rules are pretty janky but the decrease rules seem to work fairly well.
"indentationRules": { "increaseIndentPattern": "^\\s*<<(capture.*|type.*|if.*|elseif.*|else|for.*|switch.*|button.*|cycle.*|link.*|linkappend.*|linkprepend.*|listbox.*|prepend.*|replace.*|createaudiogroup.*|createplaylist.*|done.*|repeat.*|timed.*|widget.*)>>.*$", "decreaseIndentPattern": "^\\s*<<(\\/.*|elseif|else)>>.*$" },
This is what I have going on so far, I kept matching other non-indentation macros. Which is why the first part is so bad but think this would be a good addition to this awesome extension.
Thanks,
Dz
The text was updated successfully, but these errors were encountered: