- VSCode Version: 1.6.0
- OS Version: Windows 10
Steps to Reproduce:
- Install Dart-Code
- Add
"editor.formatOnSave": true to user options
- Type some Dart into a dart file
- Press
Alt+Shift+F and observe formatting work
- Insert some whitespace
- Press
Ctrl+S
Formatting works fine when I invoke it directly, but provideDocumentFormattingEdits never gets called when I press Save.
It works fine for JSON files, so I presume there's something specific about my extension, but I can't find anything in the docs suggesting I need to do anything specific to enable this?
I'm registering my formatter on activation like this:
context.subscriptions.push(vs.languages.registerDocumentFormattingEditProvider(DART_MODE, new DartFormattingEditProvider(analyzer)));
I've got a breakpoint in the first line of provideDocumentFormattingEdits but it never seems to trigger (full code for this file is here).
Steps to Reproduce:
"editor.formatOnSave": trueto user optionsAlt+Shift+Fand observe formatting workCtrl+SFormatting works fine when I invoke it directly, but
provideDocumentFormattingEditsnever gets called when I press Save.It works fine for JSON files, so I presume there's something specific about my extension, but I can't find anything in the docs suggesting I need to do anything specific to enable this?
I'm registering my formatter on activation like this:
I've got a breakpoint in the first line of
provideDocumentFormattingEditsbut it never seems to trigger (full code for this file is here).