leafOfTree / vim-vue-plugin

Vim syntax and indent plugin for .vue files
The Unlicense
177 stars 9 forks source link

Add support for <transition> attributes #28

Closed starmatt closed 3 years ago

starmatt commented 3 years ago

Hello again,

I've noticed <transition> attributes (see docs for full list) don't get highlighted like other vue attributes. Here's a screenshot showing what I mean: transition syntax

These attributes are linked to the htmlTag group instead of VueKey or htmlArg.

I also want to make a small side-note, unrelated to your plugin: do you know if there is a way to link all custom HTML attributes to the htmlArg group ? I know vim just doesn't highlight attributes it doesn't recognize, but it's been driving me crazy and I've been looking for a way to overcome this limitation.

Thanks again for your help and attention, and again, awesome plugin !

leafOfTree commented 3 years ago

Hi, thanks for the feedback and suggestion. I've updated the plugin to support the transition attributes as htmlArg. Also, if you want to highlight all custom HTML attributes as htmlArg, you can try and add

syntax match htmlArg contained "\<[-0-9A-Za-z_]\+\>"

to your custom syntax files like vimfiles/syntax/html.vim or vimfiles/syntax/vue.vim.

starmatt commented 3 years ago

Working great, thanks a lot !

leafOfTree commented 3 years ago

Glad to hear that. I just found that there was something wrong with the custom htmlArg pattern. Please try this corrected one

syntax match htmlArg contained "\<[-0-9A-Za-z_]\+\>"