We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Language extensions can provide rules for increasing/decreasing indentation when writing new lines and copy-pasting code. The VS Code documentation for this feature is here https://code.visualstudio.com/updates/v1_14#_auto-indent-on-type-move-lines-and-paste
Some scenarios where the current indentation behavior can be improved, the | marker is the position of the cursor
|
-- obtained ++ expected val x = - | + | val x = (n: Int) => - | + | 1 match { case 1 => - | + |
To play around with this feature, the language-configuration.json file needs to be updated with regex rules like this:
language-configuration.json
{ "indentationRules": { "increaseIndentPattern": "^\\s*((begin|class|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while)|(.*\\sdo\\b))\\b[^\\{;]*$", "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#_|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)" } }
https://github.com/scala/vscode-scala-syntax/blob/5211d13c231498d0ca4480a81e1e9cfa4741875b/language-configuration.json
The text was updated successfully, but these errors were encountered:
A workaround to improve the current copy-paste behavior by a tiny bit is to disable the "auto indent" setting in VS Code
Sorry, something went wrong.
@odersky this feature might be interesting for the new syntax
No branches or pull requests
Language extensions can provide rules for increasing/decreasing indentation when writing new lines and copy-pasting code. The VS Code documentation for this feature is here https://code.visualstudio.com/updates/v1_14#_auto-indent-on-type-move-lines-and-paste
Some scenarios where the current indentation behavior can be improved, the
|
marker is the position of the cursorTo play around with this feature, the
language-configuration.json
file needs to be updated with regex rules like this:https://github.com/scala/vscode-scala-syntax/blob/5211d13c231498d0ca4480a81e1e9cfa4741875b/language-configuration.json
The text was updated successfully, but these errors were encountered: