Regenerate nvim config
This commit is contained in:
@ -0,0 +1 @@
|
||||
(jsx_element) @fold
|
||||
@ -0,0 +1,67 @@
|
||||
(jsx_element
|
||||
open_tag: (jsx_opening_element
|
||||
[
|
||||
"<"
|
||||
">"
|
||||
] @tag.delimiter))
|
||||
|
||||
(jsx_element
|
||||
close_tag: (jsx_closing_element
|
||||
[
|
||||
"</"
|
||||
">"
|
||||
] @tag.delimiter))
|
||||
|
||||
(jsx_self_closing_element
|
||||
[
|
||||
"<"
|
||||
"/>"
|
||||
] @tag.delimiter)
|
||||
|
||||
(jsx_attribute
|
||||
(property_identifier) @tag.attribute)
|
||||
|
||||
(jsx_opening_element
|
||||
name: (identifier) @tag.builtin)
|
||||
|
||||
(jsx_closing_element
|
||||
name: (identifier) @tag.builtin)
|
||||
|
||||
(jsx_self_closing_element
|
||||
name: (identifier) @tag.builtin)
|
||||
|
||||
(jsx_opening_element
|
||||
((identifier) @tag
|
||||
(#lua-match? @tag "^[A-Z]")))
|
||||
|
||||
; Handle the dot operator effectively - <My.Component>
|
||||
(jsx_opening_element
|
||||
(member_expression
|
||||
(identifier) @tag.builtin
|
||||
(property_identifier) @tag))
|
||||
|
||||
(jsx_closing_element
|
||||
((identifier) @tag
|
||||
(#lua-match? @tag "^[A-Z]")))
|
||||
|
||||
; Handle the dot operator effectively - </My.Component>
|
||||
(jsx_closing_element
|
||||
(member_expression
|
||||
(identifier) @tag.builtin
|
||||
(property_identifier) @tag))
|
||||
|
||||
(jsx_self_closing_element
|
||||
((identifier) @tag
|
||||
(#lua-match? @tag "^[A-Z]")))
|
||||
|
||||
; Handle the dot operator effectively - <My.Component />
|
||||
(jsx_self_closing_element
|
||||
(member_expression
|
||||
(identifier) @tag.builtin
|
||||
(property_identifier) @tag))
|
||||
|
||||
(html_character_reference) @tag
|
||||
|
||||
(jsx_text) @none @spell
|
||||
|
||||
(html_character_reference) @character.special
|
||||
21
config/neovim/store/nvim-treesitter/queries/jsx/indents.scm
Normal file
21
config/neovim/store/nvim-treesitter/queries/jsx/indents.scm
Normal file
@ -0,0 +1,21 @@
|
||||
[
|
||||
(jsx_element)
|
||||
(jsx_self_closing_element)
|
||||
(jsx_expression)
|
||||
] @indent.begin
|
||||
|
||||
(jsx_closing_element
|
||||
">" @indent.end)
|
||||
|
||||
(jsx_self_closing_element
|
||||
"/>" @indent.end)
|
||||
|
||||
[
|
||||
(jsx_closing_element)
|
||||
">"
|
||||
] @indent.branch
|
||||
|
||||
; <button
|
||||
; />
|
||||
(jsx_self_closing_element
|
||||
"/>" @indent.branch)
|
||||
@ -0,0 +1,11 @@
|
||||
; Styled Jsx <style jsx>
|
||||
(jsx_element
|
||||
(jsx_opening_element
|
||||
(identifier) @_name
|
||||
(#eq? @_name "style")
|
||||
(jsx_attribute) @_attr
|
||||
(#eq? @_attr "jsx"))
|
||||
(jsx_expression
|
||||
((template_string) @injection.content
|
||||
(#set! injection.language "css"))
|
||||
(#offset! @injection.content 0 1 0 -1)))
|
||||
Reference in New Issue
Block a user