diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-03-01 12:26:26 -0500 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-03-05 17:15:32 -0500 |
| commit | 95bcd6a8fa1baa0824d44b697ba05bcc0b97bd34 (patch) | |
| tree | 0ba30d537783e8ee36e57e5159561da84aae6db1 | |
| parent | docs: add `@string.documentation` (diff) | |
| download | nvim-treesitter-95bcd6a8fa1baa0824d44b697ba05bcc0b97bd34.tar nvim-treesitter-95bcd6a8fa1baa0824d44b697ba05bcc0b97bd34.tar.gz nvim-treesitter-95bcd6a8fa1baa0824d44b697ba05bcc0b97bd34.tar.bz2 nvim-treesitter-95bcd6a8fa1baa0824d44b697ba05bcc0b97bd34.tar.lz nvim-treesitter-95bcd6a8fa1baa0824d44b697ba05bcc0b97bd34.tar.xz nvim-treesitter-95bcd6a8fa1baa0824d44b697ba05bcc0b97bd34.tar.zst nvim-treesitter-95bcd6a8fa1baa0824d44b697ba05bcc0b97bd34.zip | |
feat: add `@string.documentation` where applicable
| -rw-r--r-- | queries/graphql/highlights.scm | 4 | ||||
| -rw-r--r-- | queries/julia/highlights.scm | 12 | ||||
| -rw-r--r-- | queries/python/highlights.scm | 13 | ||||
| -rw-r--r-- | queries/starlark/highlights.scm | 8 |
4 files changed, 32 insertions, 5 deletions
diff --git a/queries/graphql/highlights.scm b/queries/graphql/highlights.scm index 3a9d47dad..48f27f983 100644 --- a/queries/graphql/highlights.scm +++ b/queries/graphql/highlights.scm @@ -111,9 +111,9 @@ ;--------- (description - (string_value) @comment) + (string_value) @string.documentation @spell) -(comment) @comment +(comment) @comment @spell (directive_location (executable_directive_location) @type.builtin) diff --git a/queries/julia/highlights.scm b/queries/julia/highlights.scm index bf51076c7..6044e66de 100644 --- a/queries/julia/highlights.scm +++ b/queries/julia/highlights.scm @@ -226,8 +226,18 @@ (prefixed_command_literal prefix: (identifier) @function.macro) @string.special +((string_literal) @string.documentation + . [ + (module_definition) + (abstract_definition) + (struct_definition) + (function_definition) + (assignment) + (const_declaration) + ]) + [ (line_comment) (block_comment) -] @comment +] @comment @spell diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm index fe66d7ca3..d25448000 100644 --- a/queries/python/highlights.scm +++ b/queries/python/highlights.scm @@ -176,7 +176,18 @@ (escape_sequence) @string.escape ; 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 diff --git a/queries/starlark/highlights.scm b/queries/starlark/highlights.scm index a92832d68..ab9bfd68d 100644 --- a/queries/starlark/highlights.scm +++ b/queries/starlark/highlights.scm @@ -158,7 +158,13 @@ ] @string.escape ; doc-strings -(expression_statement (string) @spell) + +(module . (expression_statement (string) @string.documentation @spell)) + +(function_definition + body: + (block + . (expression_statement (string) @string.documentation @spell))) ; Tokens |
