feat(spell): upstream spell queries from spellsitter

This commit is contained in:
Lewis Russell 2022-09-06 11:56:27 +01:00 committed by Lewis Russell
parent 3e09c81b4c
commit 2a63ea5665
13 changed files with 49 additions and 0 deletions

View file

@ -206,6 +206,10 @@ Used for xml-like tags
@conceal followed by `(#set! conceal "")` for captures that are not used for highlights but only for concealing.
#### Spell
@spell for defining regions to be spellchecked.
### Locals
```

View file

@ -167,6 +167,7 @@
name: (identifier) @function.macro)
(comment) @comment
(comment) @spell
;; Parameters
(parameter_declaration

View file

@ -30,9 +30,11 @@
; Comments
(comment) @comment
(comment) @spell
; Strings
(string) @string
(string) @spell
; Modules
(alias) @type

View file

@ -186,6 +186,7 @@
(interpreted_string_literal) @string
(raw_string_literal) @string
(raw_string_literal) @spell
(rune_literal) @string
(escape_sequence) @string.escape
@ -202,5 +203,12 @@
(field_declaration name: (field_identifier) @field)
(comment) @comment
(comment) @spell
(ERROR) @error
((interpreted_string_literal) @spell
(#not-has-parent? @spell
import_spec
)
)

View file

@ -6,6 +6,7 @@
(pair value: (string) @string)
(array (string) @string)
(string_content (escape_sequence) @string.escape)
(string_content) @spell
(ERROR) @error
["," ":"] @punctuation.delimiter
"[" @punctuation.bracket

View file

@ -234,3 +234,10 @@
command: _ @include
paths: (curly_group_path_list) @string)
(
(text) @spell
(#not-has-parent? @spell
inline_formula
displayed_equation
)
)

View file

@ -56,3 +56,5 @@
(fenced_code_block_delimiter)
] @conceal
(#set! conceal ""))
(inline) @spell

View file

@ -83,6 +83,7 @@
; Comments are comments
(comments) @comment
(comments) @spell
; POD should be handled specially with its own embedded subtype but for now
; we'll just have to do this.

View file

@ -141,6 +141,7 @@
(float) @float
(comment) @comment
(comment) @spell
(string) @string
[
(escape_sequence)
@ -148,6 +149,9 @@
"}}"
] @string.escape
; doc-strings
(expression_statement (string) @spell)
; Tokens
[

View file

@ -158,6 +158,17 @@
(title) @text.title
(comment) @comment
(comment) @spell
(comment "..") @comment
(directive
name: (type) @_directive
body: (body
(content) @spell
(#not-match? @_directive "code-block")
)
)
(paragraph) @spell
(ERROR) @error

View file

@ -162,6 +162,8 @@
] @boolean
(comment) @comment
(comment) @spell
(string_content) @spell
; Operators

View file

@ -146,6 +146,11 @@
(block_comment)
] @comment
[
(line_comment)
(block_comment)
] @spell
(boolean_literal) @boolean
(integer_literal) @number
(float_literal) @float

View file

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