mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(spell): support more languages
This commit is contained in:
parent
d712b1bed1
commit
37398c7d68
27 changed files with 41 additions and 44 deletions
|
|
@ -44,7 +44,7 @@
|
|||
(string)
|
||||
(raw_string)
|
||||
(heredoc_body)
|
||||
] @string
|
||||
] @string @spell
|
||||
|
||||
(variable_assignment (word) @string)
|
||||
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
((word) @boolean
|
||||
(#match? @boolean "^(true|false)$"))
|
||||
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
(test_operator) @string
|
||||
|
||||
(command_substitution
|
||||
|
|
|
|||
|
|
@ -166,8 +166,7 @@
|
|||
(preproc_function_def
|
||||
name: (identifier) @function.macro)
|
||||
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
(comment) @comment @spell
|
||||
|
||||
;; Parameters
|
||||
(parameter_declaration
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
|
||||
(implicit_type) @keyword
|
||||
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
|
||||
(using_directive
|
||||
(identifier) @type)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
[
|
||||
(bracket_comment)
|
||||
(line_comment)
|
||||
] @comment
|
||||
] @comment @spell
|
||||
|
||||
(normal_command (identifier) @function)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
(_) @spell
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
(important)
|
||||
] @keyword
|
||||
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
|
||||
[
|
||||
(tag_name)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
"@"
|
||||
] @operator
|
||||
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
|
||||
(image_spec
|
||||
(image_tag
|
||||
|
|
|
|||
|
|
@ -51,4 +51,6 @@
|
|||
(preproc)
|
||||
] @comment
|
||||
|
||||
(comment) @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
] @boolean
|
||||
|
||||
[
|
||||
(null)
|
||||
(null)
|
||||
(undefined)
|
||||
] @constant.builtin
|
||||
|
||||
|
|
@ -117,7 +117,9 @@
|
|||
(hash_bang_line)
|
||||
] @comment
|
||||
|
||||
(string) @string
|
||||
(comment) @spell
|
||||
|
||||
(string) @string @spell
|
||||
(template_string) @string
|
||||
(escape_sequence) @string.escape
|
||||
(regex_pattern) @string.regex
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
|
||||
[
|
||||
(directory_separator)
|
||||
|
|
|
|||
|
|
@ -185,8 +185,7 @@
|
|||
; Literals
|
||||
|
||||
(interpreted_string_literal) @string
|
||||
(raw_string_literal) @string
|
||||
(raw_string_literal) @spell
|
||||
(raw_string_literal) @string @spell
|
||||
(rune_literal) @string
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
|
|
@ -202,8 +201,7 @@
|
|||
. (literal_element (identifier) @field))
|
||||
(field_declaration name: (field_identifier) @field)
|
||||
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
(comment) @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@
|
|||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @comment
|
||||
] @comment @spell
|
||||
|
||||
[
|
||||
(true)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
; inherits: json
|
||||
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
|
|
|
|||
|
|
@ -212,6 +212,8 @@
|
|||
(shebang_line)
|
||||
] @comment
|
||||
|
||||
(comment) @spell
|
||||
|
||||
(real_literal) @float
|
||||
[
|
||||
(integer_literal)
|
||||
|
|
|
|||
|
|
@ -180,15 +180,13 @@
|
|||
|
||||
;; Others
|
||||
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
(comment) @comment @spell
|
||||
|
||||
(hash_bang_line) @comment
|
||||
|
||||
(number) @number
|
||||
|
||||
(string) @string
|
||||
(string) @spell
|
||||
(string) @string @spell
|
||||
|
||||
;; Error
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
|
||||
(conditional
|
||||
(_ [
|
||||
|
|
|
|||
|
|
@ -140,8 +140,7 @@
|
|||
(integer) @number
|
||||
(float) @float
|
||||
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
(comment) @comment @spell
|
||||
(string) @string
|
||||
[
|
||||
(escape_sequence)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
(named_node name: (identifier) @variable)
|
||||
(field_definition name: (identifier) @property)
|
||||
(negated_field "!" @operator (identifier) @property)
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
|
||||
(quantifier) @operator
|
||||
(predicate_type) @punctuation.special
|
||||
|
|
|
|||
|
|
@ -157,8 +157,7 @@
|
|||
|
||||
(title) @text.title
|
||||
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
(comment) @comment @spell
|
||||
(comment "..") @comment
|
||||
|
||||
(directive
|
||||
|
|
|
|||
|
|
@ -144,12 +144,7 @@
|
|||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @comment
|
||||
|
||||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @spell
|
||||
] @comment @spell
|
||||
|
||||
(boolean_literal) @boolean
|
||||
(integer_literal) @number
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@
|
|||
|
||||
"return" @keyword.return
|
||||
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
|
||||
;; `case` is a conditional keyword in case_block
|
||||
|
||||
|
|
|
|||
|
|
@ -96,8 +96,10 @@
|
|||
(statement_label) @label
|
||||
|
||||
; Comments
|
||||
(comment) @comment
|
||||
(multiline_comment) @comment
|
||||
[
|
||||
(comment)
|
||||
(multiline_comment)
|
||||
] @comment @spell
|
||||
|
||||
; String literals
|
||||
(line_str_text) @string
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
;; Primitives
|
||||
(boolean) @boolean
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
(comment) @comment @spell
|
||||
(shebang_comment) @comment
|
||||
(identifier) @variable
|
||||
((identifier) @variable.builtin
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
;---------
|
||||
|
||||
(boolean) @boolean
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
(string) @string
|
||||
(integer) @number
|
||||
(float) @float
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
"endcase"
|
||||
] @conditional
|
||||
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
|
||||
(include_compiler_directive) @constant.macro
|
||||
(package_import_declaration
|
||||
|
|
@ -174,7 +174,7 @@
|
|||
[
|
||||
(double_quoted_string)
|
||||
(string_literal)
|
||||
] @string
|
||||
] @string @spell
|
||||
|
||||
[
|
||||
(include_compiler_directive)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
(escape_sequence) @string.escape
|
||||
(integer_scalar) @number
|
||||
(float_scalar) @number
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
(anchor_name) @type
|
||||
(alias_name) @type
|
||||
(tag) @type
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
(container_doc_comment)
|
||||
(doc_comment)
|
||||
(line_comment)
|
||||
] @comment
|
||||
] @comment @spell
|
||||
|
||||
((line_comment) @text.note
|
||||
(#match? @text.note "^// *zig fmt: (on|off) *$")
|
||||
|
|
@ -84,7 +84,7 @@ field_constant: (IDENTIFIER) @constant
|
|||
[
|
||||
(LINESTRING)
|
||||
(STRINGLITERALSINGLE)
|
||||
] @string
|
||||
] @string @spell
|
||||
|
||||
(CHAR_LITERAL) @character
|
||||
(EscapeSequence) @string.escape
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue