feat(kauffinger/lazyvim): new config with my own from kauffinger/lazyvim
This commit is contained in:
36
after/queries/html/injections.scm
Normal file
36
after/queries/html/injections.scm
Normal file
@@ -0,0 +1,36 @@
|
||||
;; extends
|
||||
|
||||
; AlpineJS attributes
|
||||
(attribute
|
||||
(attribute_name) @_attr
|
||||
(#lua-match? @_attr "^x%-%l")
|
||||
(#not-any-of? @_attr "x-teleport" "x-ref" "x-transition")
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @injection.content)
|
||||
(#set! injection.language "javascript"))
|
||||
|
||||
; Blade escaped JS attributes
|
||||
; <x-foo ::bar="baz" />
|
||||
(element
|
||||
(_
|
||||
(tag_name) @_tag
|
||||
(#lua-match? @_tag "^x%-%l")
|
||||
(attribute
|
||||
(attribute_name) @_attr
|
||||
(#lua-match? @_attr "^::%l")
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @injection.content)
|
||||
(#set! injection.language "javascript"))))
|
||||
|
||||
; Blade PHP attributes
|
||||
; <x-foo :bar="$baz" />
|
||||
(element
|
||||
(_
|
||||
(tag_name) @_tag
|
||||
(#lua-match? @_tag "^x%-%l")
|
||||
(attribute
|
||||
(attribute_name) @_attr
|
||||
(#lua-match? @_attr "^:%l")
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @injection.content)
|
||||
(#set! injection.language "php_only"))))
|
||||
Reference in New Issue
Block a user