aboutsummaryrefslogtreecommitdiffstats
path: root/queries/python/highlights.scm
diff options
context:
space:
mode:
authorJakob Zahn <jakob.zahn@mailbox.org>2025-04-03 09:35:41 +0200
committerGitHub <noreply@github.com>2025-04-03 09:35:41 +0200
commit997288c55253e27f782d991099490f80205d65bf (patch)
treebe439bc924aa0413de5caa1a72ffad05a9daaf37 /queries/python/highlights.scm
parentci(tests): run tests on v0.10.4 (diff)
downloadnvim-treesitter-997288c55253e27f782d991099490f80205d65bf.tar
nvim-treesitter-997288c55253e27f782d991099490f80205d65bf.tar.gz
nvim-treesitter-997288c55253e27f782d991099490f80205d65bf.tar.bz2
nvim-treesitter-997288c55253e27f782d991099490f80205d65bf.tar.lz
nvim-treesitter-997288c55253e27f782d991099490f80205d65bf.tar.xz
nvim-treesitter-997288c55253e27f782d991099490f80205d65bf.tar.zst
nvim-treesitter-997288c55253e27f782d991099490f80205d65bf.zip
fix(python): highlight all types of docstrings (#7788)
Diffstat (limited to 'queries/python/highlights.scm')
-rw-r--r--queries/python/highlights.scm24
1 files changed, 3 insertions, 21 deletions
diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm
index 84b29412a..00250de1b 100644
--- a/queries/python/highlights.scm
+++ b/queries/python/highlights.scm
@@ -80,27 +80,9 @@
] @string.escape
; doc-strings
-(module
- .
- (comment)*
- .
- (expression_statement
- (string
- (string_content) @spell) @string.documentation))
-
-(class_definition
- body: (block
- .
- (expression_statement
- (string
- (string_content) @spell) @string.documentation)))
-
-(function_definition
- body: (block
- .
- (expression_statement
- (string
- (string_content) @spell) @string.documentation)))
+(expression_statement
+ (string
+ (string_content) @spell) @string.documentation)
; Tokens
[