vue-mode
vue-mode copied to clipboard
Add support for `script setup`, new in Vue 3
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.
The same line should also be added to const vue--front-tag-regex
I hope this PR will be released quickly.
@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
Can this be merged, @AdamNiederer ?
Is this project abandoned?