feat(spell): support more languages

This commit is contained in:
Lewis Russell 2022-09-26 10:19:02 +01:00 committed by Lewis Russell
parent d712b1bed1
commit 37398c7d68
27 changed files with 41 additions and 44 deletions

View file

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

View file

@ -166,8 +166,7 @@
(preproc_function_def
name: (identifier) @function.macro)
(comment) @comment
(comment) @spell
(comment) @comment @spell
;; Parameters
(parameter_declaration

View file

@ -74,7 +74,7 @@
(implicit_type) @keyword
(comment) @comment
(comment) @comment @spell
(using_directive
(identifier) @type)

View file

@ -9,7 +9,7 @@
[
(bracket_comment)
(line_comment)
] @comment
] @comment @spell
(normal_command (identifier) @function)

View file

@ -1,3 +1,5 @@
(_) @spell
[
"("
")"

View file

@ -11,7 +11,7 @@
(important)
] @keyword
(comment) @comment
(comment) @comment @spell
[
(tag_name)

View file

@ -26,7 +26,7 @@
"@"
] @operator
(comment) @comment
(comment) @comment @spell
(image_spec
(image_tag

View file

@ -51,4 +51,6 @@
(preproc)
] @comment
(comment) @spell
(ERROR) @error

View file

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

View file

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

View file

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

View file

@ -149,7 +149,7 @@
[
(line_comment)
(block_comment)
] @comment
] @comment @spell
[
(true)

View file

@ -1,3 +1,3 @@
; inherits: json
(comment) @comment
(comment) @comment @spell

View file

@ -212,6 +212,8 @@
(shebang_line)
] @comment
(comment) @spell
(real_literal) @float
[
(integer_literal)

View file

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

View file

@ -1,4 +1,4 @@
(comment) @comment
(comment) @comment @spell
(conditional
(_ [

View file

@ -140,8 +140,7 @@
(integer) @number
(float) @float
(comment) @comment
(comment) @spell
(comment) @comment @spell
(string) @string
[
(escape_sequence)

View file

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

View file

@ -157,8 +157,7 @@
(title) @text.title
(comment) @comment
(comment) @spell
(comment) @comment @spell
(comment "..") @comment
(directive

View file

@ -144,12 +144,7 @@
[
(line_comment)
(block_comment)
] @comment
[
(line_comment)
(block_comment)
] @spell
] @comment @spell
(boolean_literal) @boolean
(integer_literal) @number

View file

@ -196,7 +196,7 @@
"return" @keyword.return
(comment) @comment
(comment) @comment @spell
;; `case` is a conditional keyword in case_block

View file

@ -96,8 +96,10 @@
(statement_label) @label
; Comments
(comment) @comment
(multiline_comment) @comment
[
(comment)
(multiline_comment)
] @comment @spell
; String literals
(line_str_text) @string

View file

@ -1,8 +1,7 @@
;; Primitives
(boolean) @boolean
(comment) @comment
(comment) @spell
(comment) @comment @spell
(shebang_comment) @comment
(identifier) @variable
((identifier) @variable.builtin

View file

@ -8,7 +8,7 @@
;---------
(boolean) @boolean
(comment) @comment
(comment) @comment @spell
(string) @string
(integer) @number
(float) @float

View file

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

View file

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

View file

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