-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Expand usage of standard token type inside of the auto indentation to ignore comments and strings for indentation #209519
Comments
After some discussion with the team, we have decided on the following.
|
looking at this I have this for a block-scalar with a explicit 9 indent indicator {
// indent 9 spaces on block-scalar with indentation-indicator
"action": {
"appendText": " ",
"indent": "none",
},
"afterText": "^(?![ \t]*#)",
"beforeText": "(^[ \t]*|[-?:][ \t]+)(>|\\|)[+-]?9"
} however, I don't want to indent if the text is already within a string (or comment) I have >
>9
|9 pressing enter after
and to also throw a spanner in the works it would be nice if I could define custom character sets to remove from strings rather than just relying on brackets |
We currently have some issues with indentation when strings and comments are involved. We should ignore the indentation rules when the cursor is inside of a comment or string. This would help resolve certain issues including but not limited to:
The text was updated successfully, but these errors were encountered: