mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 09:20:04 -04:00
feat(spell): upstream spell queries from spellsitter
This commit is contained in:
parent
3e09c81b4c
commit
2a63ea5665
13 changed files with 49 additions and 0 deletions
|
|
@ -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.
|
@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
|
### Locals
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -167,6 +167,7 @@
|
||||||
name: (identifier) @function.macro)
|
name: (identifier) @function.macro)
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
(comment) @spell
|
||||||
|
|
||||||
;; Parameters
|
;; Parameters
|
||||||
(parameter_declaration
|
(parameter_declaration
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,11 @@
|
||||||
|
|
||||||
; Comments
|
; Comments
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
(comment) @spell
|
||||||
|
|
||||||
; Strings
|
; Strings
|
||||||
(string) @string
|
(string) @string
|
||||||
|
(string) @spell
|
||||||
|
|
||||||
; Modules
|
; Modules
|
||||||
(alias) @type
|
(alias) @type
|
||||||
|
|
|
||||||
|
|
@ -186,6 +186,7 @@
|
||||||
|
|
||||||
(interpreted_string_literal) @string
|
(interpreted_string_literal) @string
|
||||||
(raw_string_literal) @string
|
(raw_string_literal) @string
|
||||||
|
(raw_string_literal) @spell
|
||||||
(rune_literal) @string
|
(rune_literal) @string
|
||||||
(escape_sequence) @string.escape
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
|
|
@ -202,5 +203,12 @@
|
||||||
(field_declaration name: (field_identifier) @field)
|
(field_declaration name: (field_identifier) @field)
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
(comment) @spell
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
||||||
|
((interpreted_string_literal) @spell
|
||||||
|
(#not-has-parent? @spell
|
||||||
|
import_spec
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
(pair value: (string) @string)
|
(pair value: (string) @string)
|
||||||
(array (string) @string)
|
(array (string) @string)
|
||||||
(string_content (escape_sequence) @string.escape)
|
(string_content (escape_sequence) @string.escape)
|
||||||
|
(string_content) @spell
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
["," ":"] @punctuation.delimiter
|
["," ":"] @punctuation.delimiter
|
||||||
"[" @punctuation.bracket
|
"[" @punctuation.bracket
|
||||||
|
|
|
||||||
|
|
@ -234,3 +234,10 @@
|
||||||
command: _ @include
|
command: _ @include
|
||||||
paths: (curly_group_path_list) @string)
|
paths: (curly_group_path_list) @string)
|
||||||
|
|
||||||
|
(
|
||||||
|
(text) @spell
|
||||||
|
(#not-has-parent? @spell
|
||||||
|
inline_formula
|
||||||
|
displayed_equation
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -56,3 +56,5 @@
|
||||||
(fenced_code_block_delimiter)
|
(fenced_code_block_delimiter)
|
||||||
] @conceal
|
] @conceal
|
||||||
(#set! conceal ""))
|
(#set! conceal ""))
|
||||||
|
|
||||||
|
(inline) @spell
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@
|
||||||
|
|
||||||
; Comments are comments
|
; Comments are comments
|
||||||
(comments) @comment
|
(comments) @comment
|
||||||
|
(comments) @spell
|
||||||
|
|
||||||
; POD should be handled specially with its own embedded subtype but for now
|
; POD should be handled specially with its own embedded subtype but for now
|
||||||
; we'll just have to do this.
|
; we'll just have to do this.
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@
|
||||||
(float) @float
|
(float) @float
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
(comment) @spell
|
||||||
(string) @string
|
(string) @string
|
||||||
[
|
[
|
||||||
(escape_sequence)
|
(escape_sequence)
|
||||||
|
|
@ -148,6 +149,9 @@
|
||||||
"}}"
|
"}}"
|
||||||
] @string.escape
|
] @string.escape
|
||||||
|
|
||||||
|
; doc-strings
|
||||||
|
(expression_statement (string) @spell)
|
||||||
|
|
||||||
; Tokens
|
; Tokens
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,17 @@
|
||||||
(title) @text.title
|
(title) @text.title
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
(comment) @spell
|
||||||
(comment "..") @comment
|
(comment "..") @comment
|
||||||
|
|
||||||
|
(directive
|
||||||
|
name: (type) @_directive
|
||||||
|
body: (body
|
||||||
|
(content) @spell
|
||||||
|
(#not-match? @_directive "code-block")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(paragraph) @spell
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,8 @@
|
||||||
] @boolean
|
] @boolean
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
(comment) @spell
|
||||||
|
(string_content) @spell
|
||||||
|
|
||||||
; Operators
|
; Operators
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,11 @@
|
||||||
(block_comment)
|
(block_comment)
|
||||||
] @comment
|
] @comment
|
||||||
|
|
||||||
|
[
|
||||||
|
(line_comment)
|
||||||
|
(block_comment)
|
||||||
|
] @spell
|
||||||
|
|
||||||
(boolean_literal) @boolean
|
(boolean_literal) @boolean
|
||||||
(integer_literal) @number
|
(integer_literal) @number
|
||||||
(float_literal) @float
|
(float_literal) @float
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
;; Primitives
|
;; Primitives
|
||||||
(boolean) @boolean
|
(boolean) @boolean
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
(comment) @spell
|
||||||
(shebang_comment) @comment
|
(shebang_comment) @comment
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
((identifier) @variable.builtin
|
((identifier) @variable.builtin
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue