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