From 8b24f3e3ec568552252551e133ed22c4e502ab83 Mon Sep 17 00:00:00 2001 From: Christian Buttner Date: Sat, 18 Jan 2025 16:26:30 +0100 Subject: [PATCH] Maybe improved highlight queries for doc comment contracts. --- queries/highlights.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/queries/highlights.scm b/queries/highlights.scm index d369024..5c825f4 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -320,9 +320,13 @@ (block_comment) ] @comment @spell -(doc_comment_text) @comment.documentation @spell -(doc_comment_contract_text) @comment.documentation @spell - -(doc_comment (doc_comment_contract (at_ident) @keyword (#any-of? @keyword - "@require" - "@ensure"))) +(doc_comment) @comment.documentation +(doc_comment_text) @spell +(doc_comment_contract name: (_) @markup.strong + (#any-of? @markup.strong + "@param" + "@return" + "@deprecated" + "@require" + "@ensure" + "@pure"))