add javascript syntax highlighting to alpinejs attributes
0
alpine.scm
10 lines 489 B view raw
1// just copy and paste the treesitter query into 2// ...runtime/queries/html/injections.scm 3// 4// in neovim, similar thing except add a double back slash in front of @ so `...\\@...` 5 6((attribute 7 (attribute_name) @attribute 8 (quoted_attribute_value (attribute_value) @injection.content)) 9(#any-match? @attribute "^(x-data|:[a-z.-]+|@[a-z.-]+|x-bind|x-on:[a-z.-]+|x-text|x-html|x-model|x-show|x-for|x-if|x-init|x-effect|x-ref|x-cloak|x-ignore)$" ) 10(#set! injection.language "javascript"))