1 unstable release
0.1.0 | Jul 2, 2024 |
---|
#291 in Template engine
14KB
291 lines
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:
- Run
dprint config add malobre/vue
- Install plugins for the languages contained in your vue files.
- Ensure
.vue
file extensions are matched in anincludes
pattern:{ // -- snip -- "includes": [ "**/*.vue" ] }
- 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
Dependencies
~2.7–4MB
~76K SLoC