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