aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Kennedy <colinvfx@gmail.com>2024-04-16 21:23:55 -0700
committerGitHub <noreply@github.com>2024-04-17 04:23:55 +0000
commit037c6af78fb50ec5ca9401c3fce437b95db8e09d (patch)
tree8cf4bed35cbb1986b31ca8fae2ffba6c3bc5c196
parentfix(r): highlight comma separators (diff)
downloadnvim-treesitter-037c6af78fb50ec5ca9401c3fce437b95db8e09d.tar
nvim-treesitter-037c6af78fb50ec5ca9401c3fce437b95db8e09d.tar.gz
nvim-treesitter-037c6af78fb50ec5ca9401c3fce437b95db8e09d.tar.bz2
nvim-treesitter-037c6af78fb50ec5ca9401c3fce437b95db8e09d.tar.lz
nvim-treesitter-037c6af78fb50ec5ca9401c3fce437b95db8e09d.tar.xz
nvim-treesitter-037c6af78fb50ec5ca9401c3fce437b95db8e09d.tar.zst
nvim-treesitter-037c6af78fb50ec5ca9401c3fce437b95db8e09d.zip
fix(python): captures inner string contents with spell
-rw-r--r--queries/python/highlights.scm28
1 files changed, 25 insertions, 3 deletions
diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm
index 4d62aeff0..4737fd401 100644
--- a/queries/python/highlights.scm
+++ b/queries/python/highlights.scm
@@ -204,19 +204,41 @@
(comment)*
.
(expression_statement
- (string) @string.documentation @spell))
+ (string) @string.documentation))
(class_definition
body: (block
.
(expression_statement
- (string) @string.documentation @spell)))
+ (string) @string.documentation)))
(function_definition
body: (block
.
(expression_statement
- (string) @string.documentation @spell)))
+ (string) @string.documentation)))
+
+(module
+ .
+ (comment)*
+ .
+ (expression_statement
+ (string
+ (string_content) @spell)))
+
+(class_definition
+ body: (block
+ .
+ (expression_statement
+ (string
+ (string_content) @spell))))
+
+(function_definition
+ body: (block
+ .
+ (expression_statement
+ (string
+ (string_content) @spell))))
; Tokens
[