mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -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.
|
||||
|
||||
#### Spell
|
||||
|
||||
@spell for defining regions to be spellchecked.
|
||||
|
||||
### Locals
|
||||
|
||||
```
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@
|
|||
name: (identifier) @function.macro)
|
||||
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
|
||||
;; Parameters
|
||||
(parameter_declaration
|
||||
|
|
|
|||
|
|
@ -30,9 +30,11 @@
|
|||
|
||||
; Comments
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
|
||||
; Strings
|
||||
(string) @string
|
||||
(string) @spell
|
||||
|
||||
; Modules
|
||||
(alias) @type
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -234,3 +234,10 @@
|
|||
command: _ @include
|
||||
paths: (curly_group_path_list) @string)
|
||||
|
||||
(
|
||||
(text) @spell
|
||||
(#not-has-parent? @spell
|
||||
inline_formula
|
||||
displayed_equation
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -56,3 +56,5 @@
|
|||
(fenced_code_block_delimiter)
|
||||
] @conceal
|
||||
(#set! conceal ""))
|
||||
|
||||
(inline) @spell
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
[
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -162,6 +162,8 @@
|
|||
] @boolean
|
||||
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
(string_content) @spell
|
||||
|
||||
; Operators
|
||||
|
||||
|
|
|
|||
|
|
@ -146,6 +146,11 @@
|
|||
(block_comment)
|
||||
] @comment
|
||||
|
||||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @spell
|
||||
|
||||
(boolean_literal) @boolean
|
||||
(integer_literal) @number
|
||||
(float_literal) @float
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
;; Primitives
|
||||
(boolean) @boolean
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
(shebang_comment) @comment
|
||||
(identifier) @variable
|
||||
((identifier) @variable.builtin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue