aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/edoc
diff options
context:
space:
mode:
authorMichael Davis2022-06-22 13:57:22 +0000
committerBlaž Hrastnik2022-07-01 09:04:23 +0000
commit7cf88f2bacb92e1054294137cc4d82792f4b60a4 (patch)
tree5356b7a6a409149d390e9d7be06ee1fc3c02cc46 /runtime/queries/edoc
parent78c944ebc3c62c673f203785cdb39498e52115b7 (diff)
edoc: prevent rogue punctuation highlights
Punctuation highlights would show up outside of where they were valid, for example using parentheses in some text. This change prevents that by gating the captures to being under the named nodes in which they are valid.
Diffstat (limited to 'runtime/queries/edoc')
-rw-r--r--runtime/queries/edoc/highlights.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/queries/edoc/highlights.scm b/runtime/queries/edoc/highlights.scm
index 3a309960..4267cb9e 100644
--- a/runtime/queries/edoc/highlights.scm
+++ b/runtime/queries/edoc/highlights.scm
@@ -39,9 +39,9 @@
; could be @constant.numeric.integer but this looks similar to a capture
(arity) @operator
-[":" "/"] @operator
-["(" ")"] @punctuation.delimiter
-["{" "}"] @function.macro
+(expression [":" "/"] @operator)
+(expression ["(" ")"] @punctuation.delimiter)
+(macro ["{" "}"] @function.macro)
[
(quote_marker)