mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 09:20:04 -04:00
feat: add @string.documentation where applicable
This commit is contained in:
parent
51030378eb
commit
95bcd6a8fa
4 changed files with 32 additions and 5 deletions
|
|
@ -111,9 +111,9 @@
|
||||||
;---------
|
;---------
|
||||||
|
|
||||||
(description
|
(description
|
||||||
(string_value) @comment)
|
(string_value) @string.documentation @spell)
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment @spell
|
||||||
|
|
||||||
(directive_location
|
(directive_location
|
||||||
(executable_directive_location) @type.builtin)
|
(executable_directive_location) @type.builtin)
|
||||||
|
|
|
||||||
|
|
@ -226,8 +226,18 @@
|
||||||
(prefixed_command_literal
|
(prefixed_command_literal
|
||||||
prefix: (identifier) @function.macro) @string.special
|
prefix: (identifier) @function.macro) @string.special
|
||||||
|
|
||||||
|
((string_literal) @string.documentation
|
||||||
|
. [
|
||||||
|
(module_definition)
|
||||||
|
(abstract_definition)
|
||||||
|
(struct_definition)
|
||||||
|
(function_definition)
|
||||||
|
(assignment)
|
||||||
|
(const_declaration)
|
||||||
|
])
|
||||||
|
|
||||||
[
|
[
|
||||||
(line_comment)
|
(line_comment)
|
||||||
(block_comment)
|
(block_comment)
|
||||||
] @comment
|
] @comment @spell
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,18 @@
|
||||||
(escape_sequence) @string.escape
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
; doc-strings
|
; doc-strings
|
||||||
(expression_statement (string) @spell)
|
|
||||||
|
(module . (expression_statement (string) @string.documentation @spell))
|
||||||
|
|
||||||
|
(class_definition
|
||||||
|
body:
|
||||||
|
(block
|
||||||
|
. (expression_statement (string) @string.documentation @spell)))
|
||||||
|
|
||||||
|
(function_definition
|
||||||
|
body:
|
||||||
|
(block
|
||||||
|
. (expression_statement (string) @string.documentation @spell)))
|
||||||
|
|
||||||
; Tokens
|
; Tokens
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,13 @@
|
||||||
] @string.escape
|
] @string.escape
|
||||||
|
|
||||||
; doc-strings
|
; doc-strings
|
||||||
(expression_statement (string) @spell)
|
|
||||||
|
(module . (expression_statement (string) @string.documentation @spell))
|
||||||
|
|
||||||
|
(function_definition
|
||||||
|
body:
|
||||||
|
(block
|
||||||
|
. (expression_statement (string) @string.documentation @spell)))
|
||||||
|
|
||||||
; Tokens
|
; Tokens
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue