vscode-R
vscode-R copied to clipboard
keep indention when insert next line only when necessary such as binary operators (like `-`, `+`, `*`, `%in%`, `%>%`)
this is ccurrent implement
a <- b + # type `ENTER` to input next line, and next line won't have indention
a <- b +
d + # type `ENTER` to input next line, and next line will have indention
a <- b +
d # type `ENTER` to input next line, and next line will have indention even it's necessary to add indention
this is anticipated implement
a <- b + # type `ENTER` to input next line, and next line should have indention
a <- b +
d + # type `ENTER` to input next line, and next line will have indention
a <- b +
d # type `ENTER` to input next line, and next line shouldn't add indention
It seems the current implement of indention for next line is based on current line indention
I have tried to using this setting in vscode-R\language\r-configuration.json
according to vscode document:
"indentationRules": {
"increaseIndentPattern": "(%.*%|[\\^+\\-*/<>=!&|~?])\\s*$",
"indentNextLinePattern": "(%.*%|[\\^+\\-*/<>=!&|~?])\\s*$"
}
but it didn't work, it's weird.
Anyone made this working?
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.