I have implemented a formatter extending AbstractFormatter2 that works as expected in Eclipse by right-clicking 'Format' on selected dsl text. I packaged my dsl and formatter into a vscode extension with a language server. Now, when trying to format files in vscode by right-clicking 'Format Document' , only part of the formatter works (one keyword formats correctly but the other doesn't). Not sure why it is behaving differently.
Formatting behaves like this in Eclipse:
keyword1 XXXX
keyword2 XXXX
keyword2 XXXX
keyword2 XXXX
keyword3 {
| key | value |
| - | - |
| xx | xx |
}
But formats to this when formatting through the extension in Vscode:
keyword1 XXXX
keyword2 XXXX
keyword2 XXXX
keyword2 XXXX
keyword3 {
| key | value |
| - | - |
| xx | xx |
}
keyword3 does not prepend an additional new line to separate from keyword2. It does format the table as expected, but over indents the first line and does not indent the rest.
Look forward to hearing any feedback!