vue-mode icon indicating copy to clipboard operation
vue-mode copied to clipboard

Add support for `script setup`, new in Vue 3

Open garyo opened this issue 4 years ago • 5 comments

Vue 3 has "script setup"; see https://v3.vuejs.org/api/sfc-script-setup.html#basic-syntax for info. This change updates the script regex to allow for script setup there.

garyo avatar Sep 13 '21 01:09 garyo

The same line should also be added to const vue--front-tag-regex

MelvinTo avatar Feb 27 '22 15:02 MelvinTo

I hope this PR will be released quickly.

akicho8 avatar Apr 09 '22 04:04 akicho8

@garyo Can you fix?

The same line should also be added to const vue--front-tag-regex

  (defconst vue--front-tag-regex
    (concat "<%s"                        ; The tag name
            "\\(?:"                      ; Zero of more of...
            "\\(?:\\s-+" vue--not-lang-key "[\"'][^\"']*?[\"']\\)" ; Any optional key-value pairs like type="foo/bar".
            ;; ^ Disallow "lang" in k/v pairs to avoid matching regions with non-default languages
            "\\|\\(?:\\s-+scoped\\)"      ; The optional "scoped" attribute
            "\\|\\(?:\\s-+module\\)"      ; The optional "module" attribute
            "\\|\\(?:\\s-+setup\\)"       ; The optional "setup" attribute
            "\\)*"
            "\\s-*>\n")                     ; The end of the tag

akicho8 avatar Apr 09 '22 04:04 akicho8

Can this be merged, @AdamNiederer ?

simon-edlund avatar Aug 08 '22 06:08 simon-edlund

Is this project abandoned?

akicho8 avatar Sep 20 '22 23:09 akicho8