dannyconnell / vscode-split-html-attributes

VSCode extension for splitting HTML attributes onto separate lines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fix: v-* attributes are not sorting to the top.

34fame opened this issue · comments

Settings

  "splitHTMLAttributes.sortOrder": [
    [
      "^v-if",
      "^v-else",
      "^v-show",
      "^v-model",
      "^v-for",
      "^:key",
      "^key",
      "^v-",
      "^:",
      "^@click",
      "^@",
      "^id",
      "^class",
      "^.*=\""
    ]
  ],
  "splitHTMLAttributes.tabSize": 3,
  "splitHTMLAttributes.closingBracketOnNewLine": true

Start with

<q-btn
                  color="primary"
                  label="Add"
                  icon="add"
                  no-caps
                  size="sm"
                  v-if="!selected.length"
                  :to="{ name: 'collection-add', params: { collection: mxCollection }}"
               />

End with

<q-btn
                  :to="{ name: 'collection-add', params: { collection: mxCollection }}"
                  color="primary"
                  icon="add"
                  label="Add"
                  no-caps
                  size="sm"
                  v-if="!selected.length"
               />

@34fame it looks like you have an array inside an array there, it should be like this:

"splitHTMLAttributes.sortOrder": [
    "^v-if", "^v-else", "^v-show", "^v-model", "^v-for", "^:key", "^key", "^v-", "^:", "^@click", "^@", "^id", "^class", "^.*=\""
],