Vetur: Special color for vue specific html attributes, such as `v-model` and `@click`

Created on 28 Aug 2018  路  8Comments  路  Source: vuejs/vetur

  • [+] I have searched through existing issues
  • [ +] I have read through docs
  • [ +] I have read FAQ

Info

Problem

image

How do I set v-if @click v-model :class ... highlight to other color like pic

feature-request grammar

Most helpful comment

Isn't this already achievable?

"editor.tokenColorCustomizations": {
    "textMateRules": [
        {
            "scope": "meta.directive.vue entity.other.attribute-name.html",
            "settings": {
                "foreground": "#e90"
            }
        }
    ],
}

Could be done for each theme separately also.

"editor.tokenColorCustomizations": {
    "[Default Dark+]": {
        "textMateRules": [
            {
                "scope": "meta.directive.vue entity.other.attribute-name.html",
                "settings": {
                    "foreground": "#e90"
                }
            }
        ],
    },
},

All 8 comments

This is how it looks for me in the default theme.

image

Is this a html file or vue file?

it is html default template
image
it is default vue template
image

I want to change v-for v-if v-model different color in html
image
"type " "class" "id " if color same with v-if
image

it 's hard to watch what status are htmls ,what status are vues
so I wanna to change color for vue status

OK, thanks for clarification.

so can I change highlight color by vetur?

You can't, as of now. This requires changes in both Vue grammar and the theme you are using.

thank you very much for your patience answer

It would be pretty cool if you could set a custom color for vue-specific attributes in HTML.

Isn't this already achievable?

"editor.tokenColorCustomizations": {
    "textMateRules": [
        {
            "scope": "meta.directive.vue entity.other.attribute-name.html",
            "settings": {
                "foreground": "#e90"
            }
        }
    ],
}

Could be done for each theme separately also.

"editor.tokenColorCustomizations": {
    "[Default Dark+]": {
        "textMateRules": [
            {
                "scope": "meta.directive.vue entity.other.attribute-name.html",
                "settings": {
                    "foreground": "#e90"
                }
            }
        ],
    },
},
Was this page helpful?
0 / 5 - 0 ratings