Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,33 +54,6 @@ This extension comes with 2 actions that you can configure the way you want and

![MultiFormat available actions](image/README/MultiFormat%20available%20actions.png)

## Supported languages and frameworks

- Astro
- CSS
- ERB
- Haskell
- HTML
- JavaScript
- JSON
- Markdown
- MATLAB
- MDX
- PHP
- PostCSS
- Python
- React (JSX and TSX)
- Robotframework
- Rust
- SCSS
- Svelte
- Twig
- TypeScript
- Vue
- Ruby

It's probably easy to add more of them to the list as this depends on other formatters and it's not a formatter by itself, so feel free to add by yourself any language you want in the `package.json` under `activationEvents` and also in the file `src\supported-languages.ts`, test it and create a pull request to this repo 🧐👍.

# License

This code is licensed under [GNU GPLv3](./LICENSE)
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 2 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "multi-formatter",
"displayName": "Multiple Formatters",
"publisher": "Jota0222",
"version": "1.6.2",
"version": "1.7.0",
"description": "It allows to use multiple formatters as a composite formatter in just one run in Visual Studio Code",
"repository": {
"url": "https://github.com/jota0222/MultiFormatterVSCode.git"
Expand Down Expand Up @@ -55,31 +55,7 @@
}
},
"activationEvents": [
"onLanguage:astro",
"onLanguage:css",
"onLanguage:erb",
"onLanguage:haskell",
"onLanguage:html",
"onLanguage:javascript",
"onLanguage:javascriptreact",
"onLanguage:json",
"onLanguage:markdown",
"onLanguage:matlab",
"onLanguage:mdx",
"onLanguage:php",
"onLanguage:postcss",
"onLanguage:python",
"onLanguage:robotframework",
"onLanguage:ruby",
"onLanguage:rust",
"onLanguage:scss",
"onLanguage:svelte",
"onLanguage:twig",
"onLanguage:typescript",
"onLanguage:typescriptreact",
"onLanguage:vue-html",
"onLanguage:vue-postcss",
"onLanguage:vue"
"onLanguage"
],
"devDependencies": {
"@types/vscode": "^1.75.0",
Expand Down
5 changes: 2 additions & 3 deletions src/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
WorkspaceConfiguration,
ConfigurationTarget,
} from "vscode";
import supportedLanguages from "./supported-languages";

export default class Formatter {
private readonly FORMAT_DOCUMENT_ACTION = "editor.action.formatDocument";
Expand All @@ -33,11 +32,11 @@ export default class Formatter {
}

init(context: ExtensionContext) {
this.logger.appendLine(`Registering actions and formatter for supported languages`);
this.logger.appendLine(`Registering actions and formatter`);
context.subscriptions.push(
commands.registerCommand("multiFormatter.formatSelection", this.formatSelection.bind(this)),
commands.registerCommand("multiFormatter.formatDocument", this.formatDocument.bind(this)),
languages.registerDocumentRangeFormattingEditProvider(supportedLanguages, {
languages.registerDocumentRangeFormattingEditProvider('*', {
provideDocumentRangeFormattingEdits: this.selectFormattingAction.bind(this),
}),
);
Expand Down
27 changes: 0 additions & 27 deletions src/supported-languages.ts

This file was deleted.