Regenerate nvim config
This commit is contained in:
@ -0,0 +1,6 @@
|
||||
[
|
||||
(element)
|
||||
(template_element)
|
||||
(script_element)
|
||||
(style_element)
|
||||
] @fold
|
||||
@ -0,0 +1,43 @@
|
||||
; inherits: html_tags
|
||||
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
|
||||
(interpolation) @punctuation.special
|
||||
|
||||
(interpolation
|
||||
(raw_text) @none)
|
||||
|
||||
(dynamic_directive_inner_value) @variable
|
||||
|
||||
(directive_name) @tag.attribute
|
||||
|
||||
; Accessing a component object's field
|
||||
(":"
|
||||
.
|
||||
(directive_value) @variable.member)
|
||||
|
||||
("."
|
||||
.
|
||||
(directive_value) @property)
|
||||
|
||||
; @click is like onclick for HTML
|
||||
("@"
|
||||
.
|
||||
(directive_value) @function.method)
|
||||
|
||||
; Used in v-slot, declaring position the element should be put in
|
||||
("#"
|
||||
.
|
||||
(directive_value) @variable)
|
||||
|
||||
(directive_attribute
|
||||
(quoted_attribute_value) @punctuation.special)
|
||||
|
||||
(directive_attribute
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @none))
|
||||
|
||||
(directive_modifier) @function.method
|
||||
@ -0,0 +1,7 @@
|
||||
; inherits: html_tags
|
||||
|
||||
(template_element) @indent.begin
|
||||
|
||||
(template_element
|
||||
(end_tag
|
||||
">" @indent.end) @indent.branch)
|
||||
@ -0,0 +1,77 @@
|
||||
; inherits html_tags
|
||||
; <script lang="css">
|
||||
((style_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @_lang
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @injection.language)))
|
||||
(raw_text) @injection.content)
|
||||
(#eq? @_lang "lang")
|
||||
(#any-of? @injection.language "css" "scss"))
|
||||
|
||||
; TODO: When nvim-treesitter has postcss and less parsers, use @injection.language and @injection.content instead
|
||||
; <script lang="scss">
|
||||
(style_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @_lang
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @_scss)))
|
||||
(raw_text) @injection.content
|
||||
(#eq? @_lang "lang")
|
||||
(#any-of? @_scss "less" "postcss" "sass")
|
||||
(#set! injection.language "scss"))
|
||||
|
||||
; <script lang="js">
|
||||
((script_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @_lang
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @_js)))
|
||||
(raw_text) @injection.content)
|
||||
(#eq? @_lang "lang")
|
||||
(#eq? @_js "js")
|
||||
(#set! injection.language "javascript"))
|
||||
|
||||
; <script lang="ts">
|
||||
((script_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @_lang
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @_ts)))
|
||||
(raw_text) @injection.content)
|
||||
(#eq? @_lang "lang")
|
||||
(#eq? @_ts "ts")
|
||||
(#set! injection.language "typescript"))
|
||||
|
||||
; <script lang="tsx">
|
||||
; <script lang="jsx">
|
||||
(script_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @_attr
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @injection.language)))
|
||||
(#eq? @_attr "lang")
|
||||
(#any-of? @injection.language "tsx" "jsx")
|
||||
(raw_text) @injection.content)
|
||||
|
||||
((interpolation
|
||||
(raw_text) @injection.content)
|
||||
(#set! injection.language "typescript"))
|
||||
|
||||
(directive_attribute
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @injection.content
|
||||
(#set! injection.language "typescript")))
|
||||
|
||||
(template_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @injection.language)))
|
||||
(text) @injection.content
|
||||
(#eq? @injection.language "pug"))
|
||||
Reference in New Issue
Block a user