feat: @spell on comments

This commit is contained in:
Jaehwang Jung 2023-09-13 00:25:01 +09:00 committed by Christian Clason
parent 905e782e80
commit 9567185621
56 changed files with 61 additions and 57 deletions

View file

@ -35,7 +35,7 @@
(pragma) @preproc (pragma) @preproc
(comment) @comment (comment) @comment @spell
;; Keywords ;; Keywords
[ [

View file

@ -11,6 +11,8 @@
(comment) (comment)
] @comment ] @comment
(comment) @spell
[ [
"=" "="
"#" "#"

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,4 @@
(comment) @comment (comment) @comment @spell
[ [
(preproc_include) (preproc_include)

View file

@ -5,7 +5,7 @@
(integer) @number (integer) @number
(comment) @comment (comment) @comment @spell
;;;; Identifiers ;;;; ;;;; Identifiers ;;;;

View file

@ -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

View file

@ -38,4 +38,4 @@
; Comments ; Comments
(comment) @comment (comment) @comment @spell

View file

@ -1,4 +1,4 @@
(comment) @comment (comment) @comment @spell
["if" "elif"] @conditional ["if" "elif"] @conditional
(if (else "else" @conditional)) (if (else "else" @conditional))

View file

@ -1,4 +1,4 @@
(comment_directive) @comment (comment_directive) @comment @spell
[ [
"<%#" "<%#"

View file

@ -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

View file

@ -16,6 +16,6 @@
(end_definition) (end_definition)
] @punctuation.delimiter ] @punctuation.delimiter
(comment) @comment (comment) @comment @spell
(ERROR) @error (ERROR) @error

View file

@ -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

View file

@ -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)

View file

@ -9,7 +9,7 @@
"=>" @operator "=>" @operator
(comment) @comment (comment) @comment @spell
(module_path) @text.uri (module_path) @text.uri
[ [

View file

@ -6,7 +6,7 @@
"=>" @operator "=>" @operator
(comment) @comment (comment) @comment @spell
[ [
(version) (version)

View file

@ -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

View file

@ -13,4 +13,4 @@
"{" @punctuation.bracket "{" @punctuation.bracket
"}" @punctuation.bracket "}" @punctuation.bracket
(comment) @comment (comment) @comment @spell

View file

@ -1,4 +1,4 @@
(comment) @comment (comment) @comment @spell
(null) @constant.builtin (null) @constant.builtin
[ (true) (false) ] @boolean [ (true) (false) ] @boolean

View file

@ -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)

View file

@ -1,6 +1,6 @@
(section_name (section_name
(text) @type) ; consistency with toml (text) @type) ; consistency with toml
(comment) @comment (comment) @comment @spell
[ [
"[" "["

View file

@ -9,7 +9,7 @@
(number) @number (number) @number
(comment) @comment (comment) @comment @spell
(member (member
name: (_) @keyword) name: (_) @keyword)

View file

@ -1,5 +1,5 @@
(id) @variable (id) @variable
(comment) @comment (comment) @comment @spell
; Literals ; Literals
(null) @constant.builtin (null) @constant.builtin

View file

@ -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

View file

@ -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"))

View file

@ -3,7 +3,7 @@
(comment) (comment)
(note) (note)
(test) (test)
] @comment ] @comment @spell
[ [
(quantity) (quantity)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -1,4 +1,4 @@
(comment) @comment (comment) @comment @spell
(number) @number (number) @number
(bool) @boolean (bool) @boolean

View file

@ -332,4 +332,4 @@
(caret_id) @tag (caret_id) @tag
(value_use) @variable (value_use) @variable
(comment) @comment (comment) @comment @spell

View file

@ -96,3 +96,5 @@
(split) (split)
(comment) (comment)
] @comment ] @comment
(comment) @spell

View file

@ -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) ]

View file

@ -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

View file

@ -37,5 +37,5 @@
; Misc ; Misc
(comment) @comment (comment) @comment @spell
(ERROR) @error (ERROR) @error

View file

@ -6,6 +6,6 @@
(data) @none (data) @none
(comment) @comment (comment) @comment @spell
(ERROR) @error (ERROR) @error

View file

@ -1,4 +1,4 @@
[ (line_comment) (block_comment) ] @comment [ (line_comment) (block_comment) ] @comment @spell
(label_decl) @label (label_decl) @label

View file

@ -19,4 +19,4 @@
(ERROR) @error (ERROR) @error
(comment) @comment (comment) @comment @spell

View file

@ -93,7 +93,7 @@
(undefined) (undefined)
] @constant.builtin ] @constant.builtin
(comment) @comment (comment) @comment @spell
[ [
(string) (string)

View file

@ -1,4 +1,4 @@
(comment) @comment (comment) @comment @spell
"@media" @keyword "@media" @keyword
"@import" @include "@import" @include

View file

@ -37,7 +37,7 @@
(term (ref (var))) @variable (term (ref (var))) @variable
(comment) @comment (comment) @comment @spell
(number) @number (number) @number

View file

@ -1,7 +1,7 @@
[ [
(comment) (comment)
(extra_text) (extra_text)
] @comment ] @comment @spell
[ [
(section_header) (section_header)

View file

@ -26,7 +26,7 @@
"in" "in"
] @repeat ] @repeat
(single_line_comment) @comment (single_line_comment) @comment @spell
(function_name) @function (function_name) @function

View file

@ -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

View file

@ -176,7 +176,7 @@
] @keyword.operator ] @keyword.operator
(comment) @comment (comment) @comment @spell
; Could this be summarized? ; Could this be summarized?

View file

@ -49,6 +49,6 @@
"=>" "=>"
] @punctuation.delimiter ] @punctuation.delimiter
(comment) @comment (comment) @comment @spell
(ERROR) @error (ERROR) @error

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -111,7 +111,7 @@
; }}} ; }}}
; Misc {{{ ; Misc {{{
(comment) @comment (comment) @comment @spell
(type_identifier) @type (type_identifier) @type
(field_identifier) @property (field_identifier) @property

View file

@ -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)

View file

@ -48,7 +48,7 @@
(anon) (anon)
] @punctuation.bracket ] @punctuation.bracket
(comment) @comment (comment) @comment @spell
(echar) @string.escape (echar) @string.escape

View file

@ -1,4 +1,4 @@
(comment) @comment (comment) @comment @spell
(definition) @keyword (definition) @keyword

View file

@ -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

View file

@ -36,7 +36,7 @@
; Special ; Special
(comment) @comment (comment) @comment @spell
[ [
"(" "("

View file

@ -1,5 +1,5 @@
(comment) @comment (comment) @comment @spell
; Module / submodule ; Module / submodule
["module" "submodule"] @keyword ["module" "submodule"] @keyword