mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20:02 -04:00
feat: @spell on comments
This commit is contained in:
parent
905e782e80
commit
9567185621
56 changed files with 61 additions and 57 deletions
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
(pragma) @preproc
|
(pragma) @preproc
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
;; Keywords
|
;; Keywords
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
(comment)
|
(comment)
|
||||||
] @comment
|
] @comment
|
||||||
|
|
||||||
|
(comment) @spell
|
||||||
|
|
||||||
[
|
[
|
||||||
"="
|
"="
|
||||||
"#"
|
"#"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
(string) @string
|
(string) @string
|
||||||
(escape_sequence) @string.escape
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(constant) @constant.builtin
|
(constant) @constant.builtin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
"." @punctuation.delimiter
|
"." @punctuation.delimiter
|
||||||
|
|
||||||
(input) @constant
|
(input) @constant
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(string) @string
|
(string) @string
|
||||||
(integer) @number
|
(integer) @number
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
[
|
[
|
||||||
(preproc_include)
|
(preproc_include)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
(integer) @number
|
(integer) @number
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
;;;; Identifiers ;;;;
|
;;;; Identifiers ;;;;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
] @tag.delimiter
|
] @tag.delimiter
|
||||||
|
|
||||||
; EEx comments are highlighted as such
|
; EEx comments are highlighted as such
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
; Tree-sitter parser errors
|
; Tree-sitter parser errors
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
|
|
@ -38,4 +38,4 @@
|
||||||
|
|
||||||
; Comments
|
; Comments
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
["if" "elif"] @conditional
|
["if" "elif"] @conditional
|
||||||
(if (else "else" @conditional))
|
(if (else "else" @conditional))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
(comment_directive) @comment
|
(comment_directive) @comment @spell
|
||||||
|
|
||||||
[
|
[
|
||||||
"<%#"
|
"<%#"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
;; Comments
|
;; Comments
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
;; Generic Key-value pairs and dictionary keywords
|
;; Generic Key-value pairs and dictionary keywords
|
||||||
(key_value
|
(key_value
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,6 @@
|
||||||
(end_definition)
|
(end_definition)
|
||||||
] @punctuation.delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
(afx_comment) @comment
|
(afx_comment) @comment @spell
|
||||||
|
|
||||||
; identifiers afx
|
; identifiers afx
|
||||||
(afx_opening_element
|
(afx_opening_element
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
(hash_pair key: (identifier) @property)
|
(hash_pair key: (identifier) @property)
|
||||||
|
|
||||||
(comment_statement) @comment
|
(comment_statement) @comment @spell
|
||||||
|
|
||||||
(attribute_node "=" @operator)
|
(attribute_node "=" @operator)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
"=>" @operator
|
"=>" @operator
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
(module_path) @text.uri
|
(module_path) @text.uri
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
"=>" @operator
|
"=>" @operator
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
[
|
[
|
||||||
(version)
|
(version)
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
(doctype) @constant
|
(doctype) @constant
|
||||||
|
|
||||||
; HEEx comments are highlighted as such
|
; HEEx comments are highlighted as such
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
; HEEx text content is treated as markup
|
; HEEx text content is treated as markup
|
||||||
(text) @text
|
(text) @text
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,4 @@
|
||||||
"{" @punctuation.bracket
|
"{" @punctuation.bracket
|
||||||
"}" @punctuation.bracket
|
"}" @punctuation.bracket
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(null) @constant.builtin
|
(null) @constant.builtin
|
||||||
[ (true) (false) ] @boolean
|
[ (true) (false) ] @boolean
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
(tag_name) @tag
|
(tag_name) @tag
|
||||||
(erroneous_end_tag_name) @error
|
(erroneous_end_tag_name) @error
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
(attribute_name) @tag.attribute
|
(attribute_name) @tag.attribute
|
||||||
(attribute
|
(attribute
|
||||||
(quoted_attribute_value) @string)
|
(quoted_attribute_value) @string)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
(section_name
|
(section_name
|
||||||
(text) @type) ; consistency with toml
|
(text) @type) ; consistency with toml
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
[
|
[
|
||||||
"["
|
"["
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
(number) @number
|
(number) @number
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(member
|
(member
|
||||||
name: (_) @keyword)
|
name: (_) @keyword)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
(id) @variable
|
(id) @variable
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
; Literals
|
; Literals
|
||||||
(null) @constant.builtin
|
(null) @constant.builtin
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,6 @@
|
||||||
|
|
||||||
(source (prompt) @text.uri @string.special)
|
(source (prompt) @text.uri @string.special)
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
(line_comment)
|
(line_comment)
|
||||||
(block_comment)
|
(block_comment)
|
||||||
(comment_environment)
|
(comment_environment)
|
||||||
] @comment
|
] @comment @spell
|
||||||
|
|
||||||
((line_comment) @preproc
|
((line_comment) @preproc
|
||||||
(#lua-match? @preproc "^%% !TeX"))
|
(#lua-match? @preproc "^%% !TeX"))
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
(comment)
|
(comment)
|
||||||
(note)
|
(note)
|
||||||
(test)
|
(test)
|
||||||
] @comment
|
] @comment @spell
|
||||||
|
|
||||||
[
|
[
|
||||||
(quantity)
|
(quantity)
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@
|
||||||
] @keyword.function)
|
] @keyword.function)
|
||||||
|
|
||||||
(number) @number
|
(number) @number
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
(string) @string
|
(string) @string
|
||||||
(cstring) @string
|
(cstring) @string
|
||||||
(label) @label
|
(label) @label
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
(repeat (control_mnemonic) @repeat)
|
(repeat (control_mnemonic) @repeat)
|
||||||
(conditional (control_mnemonic) @conditional)
|
(conditional (control_mnemonic) @conditional)
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
[
|
[
|
||||||
(operator)
|
(operator)
|
||||||
|
|
|
||||||
|
|
@ -25,5 +25,5 @@
|
||||||
(ocaml_type) @type
|
(ocaml_type) @type
|
||||||
(ocaml) @none
|
(ocaml) @none
|
||||||
|
|
||||||
[(comment) (line_comment) (ocaml_comment)] @comment
|
[(comment) (line_comment) (ocaml_comment)] @comment @spell
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
(number) @number
|
(number) @number
|
||||||
(bool) @boolean
|
(bool) @boolean
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -332,4 +332,4 @@
|
||||||
|
|
||||||
(caret_id) @tag
|
(caret_id) @tag
|
||||||
(value_use) @variable
|
(value_use) @variable
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
|
||||||
|
|
@ -96,3 +96,5 @@
|
||||||
(split)
|
(split)
|
||||||
(comment)
|
(comment)
|
||||||
] @comment
|
] @comment
|
||||||
|
|
||||||
|
(comment) @spell
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
"or" @keyword.operator
|
"or" @keyword.operator
|
||||||
|
|
||||||
; comments
|
; comments
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
; strings
|
; strings
|
||||||
([ (string_expression) (indented_string_expression) ]
|
([ (string_expression) (indented_string_expression) ]
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,6 @@
|
||||||
; Comments
|
; Comments
|
||||||
;---------
|
;---------
|
||||||
|
|
||||||
[(comment) (line_number_directive) (directive) (shebang)] @comment
|
[(comment) (line_number_directive) (directive) (shebang)] @comment @spell
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
|
|
@ -37,5 +37,5 @@
|
||||||
|
|
||||||
; Misc
|
; Misc
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,6 @@
|
||||||
|
|
||||||
(data) @none
|
(data) @none
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[ (line_comment) (block_comment) ] @comment
|
[ (line_comment) (block_comment) ] @comment @spell
|
||||||
|
|
||||||
(label_decl) @label
|
(label_decl) @label
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,4 @@
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@
|
||||||
(undefined)
|
(undefined)
|
||||||
] @constant.builtin
|
] @constant.builtin
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
[
|
[
|
||||||
(string)
|
(string)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
"@media" @keyword
|
"@media" @keyword
|
||||||
"@import" @include
|
"@import" @include
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
(term (ref (var))) @variable
|
(term (ref (var))) @variable
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(number) @number
|
(number) @number
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[
|
[
|
||||||
(comment)
|
(comment)
|
||||||
(extra_text)
|
(extra_text)
|
||||||
] @comment
|
] @comment @spell
|
||||||
|
|
||||||
[
|
[
|
||||||
(section_header)
|
(section_header)
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
"in"
|
"in"
|
||||||
] @repeat
|
] @repeat
|
||||||
|
|
||||||
(single_line_comment) @comment
|
(single_line_comment) @comment @spell
|
||||||
(function_name) @function
|
(function_name) @function
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
(int_literal) @number
|
(int_literal) @number
|
||||||
(float_literal) @float
|
(float_literal) @float
|
||||||
(string_literal) @string
|
(string_literal) @string
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@
|
||||||
] @keyword.operator
|
] @keyword.operator
|
||||||
|
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
|
|
||||||
; Could this be summarized?
|
; Could this be summarized?
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,6 @@
|
||||||
"=>"
|
"=>"
|
||||||
] @punctuation.delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
; See this for full list: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md
|
; See this for full list: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md
|
||||||
|
|
||||||
; comments
|
; comments
|
||||||
(line_comment) @comment
|
(line_comment) @comment @spell
|
||||||
(block_comment) @comment
|
(block_comment) @comment @spell
|
||||||
|
|
||||||
; Argument definition
|
; Argument definition
|
||||||
(argument name: (identifier) @parameter)
|
(argument name: (identifier) @parameter)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
(text) @text
|
(text) @text
|
||||||
|
|
||||||
; Surface has two types of comments, both are highlighted as such
|
; Surface has two types of comments, both are highlighted as such
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
; Surface attributes are highlighted as HTML attributes
|
; Surface attributes are highlighted as HTML attributes
|
||||||
(attribute_name) @tag.attribute
|
(attribute_name) @tag.attribute
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,6 @@
|
||||||
(punctuation) @punctuation.bracket
|
(punctuation) @punctuation.bracket
|
||||||
(delimiter) @punctuation.delimiter
|
(delimiter) @punctuation.delimiter
|
||||||
(keysym) @variable
|
(keysym) @variable
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
(range) @number
|
(range) @number
|
||||||
"\\\n" @punctuation.special
|
"\\\n" @punctuation.special
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
; }}}
|
; }}}
|
||||||
|
|
||||||
; Misc {{{
|
; Misc {{{
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
(field_identifier) @property
|
(field_identifier) @property
|
||||||
|
|
|
||||||
|
|
@ -232,8 +232,8 @@
|
||||||
; Comments and tags
|
; Comments and tags
|
||||||
(block_comment "(*" @comment)
|
(block_comment "(*" @comment)
|
||||||
(block_comment "*)" @comment)
|
(block_comment "*)" @comment)
|
||||||
(block_comment_text) @comment
|
(block_comment_text) @comment @spell
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
(single_line) @comment
|
(single_line) @comment
|
||||||
(_ label: (identifier) @label)
|
(_ label: (identifier) @label)
|
||||||
(label name: (_) @label)
|
(label name: (_) @label)
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
(anon)
|
(anon)
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(echar) @string.escape
|
(echar) @string.escape
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(definition) @keyword
|
(definition) @keyword
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,6 @@
|
||||||
(attribute
|
(attribute
|
||||||
(identifier) @attribute)
|
(identifier) @attribute)
|
||||||
|
|
||||||
[(line_comment) (block_comment)] @comment
|
[(line_comment) (block_comment)] @comment @spell
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
; Special
|
; Special
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
[
|
[
|
||||||
"("
|
"("
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
; Module / submodule
|
; Module / submodule
|
||||||
["module" "submodule"] @keyword
|
["module" "submodule"] @keyword
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue