vetur
vetur copied to clipboard
Tokenize vue specific attributes under `meta.directive.vue` when having no attribute value
Info
- Platform: Win 10
- Vetur version: 0.14.3
- VS Code version: 1.29.1
Problem
Having different color for vue-specific attributes:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "meta.directive.vue entity.other.attribute-name.html",
"settings": {
"foreground": "#e90"
}
}
],
}
Some of them are not colorized because of the missing =
after the attribute.
<template>
<div>
<div @click.prevent></div>
<div @click.stop></div>
<div v-on:click.stop></div>
<div v-on:click.prevent></div>
<form v-on:submit.prevent></form>
<!-- ... -->
</div>
</template>
It would be nice if colorization made =
optional and worked for every case.
@octref, you've missed an issue.
Oops, I was traveling while you opened the issue. Somehow it slipped my inbox. Thanks for the reminder.
Similar to #883.
That issue is asking for a way to colorize vue-specific attributes. It is already possible at least for half a year.
Sorry, I had been busy and traveling. Let me get back to this...
I also would like to see this improvement and be able to target each of the pieces separately.
<div @click.prevent></div>
<div @click.stop></div>
<div v-on:click.stop></div>
<div v-on:click.prevent></div>
<form v-on:submit.prevent></form>
For example, each of these would be targeted by different scopes. Something like this.
-
@
,:
scoped as some sort ofsymbol
,operator
, or ... -
v-on
scoped asattribute.directive
-
click
scoped asattribute.name
-
stop
scoped asattribute.other