it triggers even when editing outside multiline strings
it doesn't auto-insert | for copy-pasted multiline code
it only works for VS Code
Additional context
In LSP there is a textDocument/formattingOnType request that allows us to produce the same behaviour that allows us to implement this analysis on top of tokens and make it work for all editors.
Is your feature request related to a problem? Please describe.
When editing multiline strings with
.stripMargin
it's currently necessary to manually type the|
character and indent it.Describe the solution you'd like
It would be nice if Metals inserted the
|
character at the correct indentation as we type, the same way it works in IntelliJ.Describe alternatives you've considered
In the PR https://github.com/scalameta/metals-vscode/pull/121, we added basic support for similar functionality in the VS Code extension. This solution has several limitations however:
|
for copy-pasted multiline codeAdditional context
In LSP there is a
textDocument/formattingOnType
request that allows us to produce the same behaviour that allows us to implement this analysis on top of tokens and make it work for all editors.