Open cnshenj opened 6 years ago
This is pretty much essential for a formatting extension
@mrmlnc check out Language Server Protocol to register for document formatting https://code.visualstudio.com/docs/extensionAPI/language-support#_format-source-code-in-an-editor
According to the documentation, the extension has to be registered using vscode.languages.registerDocumentFormattingEditProvider('css', {...});
in extension.ts
.
Unfortunately I have no experience in VS Code extension development but it looks like it should be fairly manageable. It's a shame that the plugin is listed in the "Formatters" category but doesn't actually provide one.
Please look into it @mrmlnc 🙏
Environment
Steps to reproduce
In a LESS file, either use command palette to invoke "Format Document" command or press the default shortcut key Shift+Alt+F.
Actual behavior
Expected behavior
Format LESS using CSScomb
Note
Users can register a different keybinding for CSScomb. But then it is not consistent with other formatters, and users have to remember to use a different keybinding when in CSS/LESS files.