anyformatter-vscode

0.1.0 • Public • Published

anyformatter-vscode

VS Code extension for formatting any file using external command.

Usage

  1. Install https://github.com/lxl66566/anyformatter-vscode
  2. Edit settings.json to add your formatter command and arguments. Example:
    "anyformatter": {
      "toml": { "command": "taplo fmt -" },
      "nix": { "command": "nixfmt -" }
    },
  3. Set anyformatter as default formatter.
    "[toml]": {
      "editor.formatOnSave": true,
      "editor.defaultFormatter": "lxl66566.anyformatter-vscode"
    },
    "[nix]": {
      "editor.formatOnSave": true,
      "editor.defaultFormatter": "lxl66566.anyformatter-vscode"
    },

Note that the external formatter must be able to accept stdin and output to stdout.

Readme

Keywords

none

Package Sidebar

Install

npm i anyformatter-vscode

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

5.96 kB

Total Files

6

Last publish

Collaborators

  • absolutex