diff options
| -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 |
