dprint-vue-plugin

Crates.iodprint-vue-plugin
lib.rsdprint-vue-plugin
version0.1.0
sourcesrc
created_at2024-07-02 13:06:51.261852
updated_at2024-07-02 13:06:51.261852
descriptiona fork of dprint-plugin-vue
homepage
repository
max_upload_size
id1289575
size17,923
Collins Muriuki (c12i)

documentation

README

dprint-plugin-vue

Format Vue SFC.

This plugin format root-level blocks through dprint, meaning you will need to install plugins for the languages contained in your Vue SFCs.

Block default language

Unless a lang attribute is present:

Block Default
script js
template html
style css

Usage

Install and setup dprint, then:

  1. Run
    dprint config add malobre/vue
    
  2. Install plugins for the languages contained in your vue files.
  3. Ensure .vue file extensions are matched in an includes pattern:
    {
      // -- snip --
      "includes": [
        "**/*.vue"
      ]
    }
    
  4. Add a vue configuration property if desired:
    {
      // -- snip --
      "vue": {
        // vue config goes here
      }
    }
    

Configuration

Key Default Description
indentTemplate true Indent the content of the <template> tag
indentWidth 2 Width of the indentation
useTabs false Use tabs for indentation

Building

Run

cargo build --release --target=wasm32-unknown-unknown
Commit count: 0

cargo fmt