aboutsummaryrefslogtreecommitdiffstats
path: root/queries/ruby
diff options
context:
space:
mode:
authorAmaan Qureshi <amaanq12@gmail.com>2023-03-02 08:06:35 -0500
committerAmaan Qureshi <amaanq12@gmail.com>2023-03-05 17:15:32 -0500
commit5a87bc98dabd0d38152a6fa774005f7ecbd40f1b (patch)
tree941f6fdcddf4468c10212dd170bae3ff361f867c /queries/ruby
parentdocs: add `@comment.documentation` (diff)
downloadnvim-treesitter-5a87bc98dabd0d38152a6fa774005f7ecbd40f1b.tar
nvim-treesitter-5a87bc98dabd0d38152a6fa774005f7ecbd40f1b.tar.gz
nvim-treesitter-5a87bc98dabd0d38152a6fa774005f7ecbd40f1b.tar.bz2
nvim-treesitter-5a87bc98dabd0d38152a6fa774005f7ecbd40f1b.tar.lz
nvim-treesitter-5a87bc98dabd0d38152a6fa774005f7ecbd40f1b.tar.xz
nvim-treesitter-5a87bc98dabd0d38152a6fa774005f7ecbd40f1b.tar.zst
nvim-treesitter-5a87bc98dabd0d38152a6fa774005f7ecbd40f1b.zip
feat: add `@comment.documentation` where applicable
Diffstat (limited to 'queries/ruby')
-rw-r--r--queries/ruby/highlights.scm23
1 files changed, 20 insertions, 3 deletions
diff --git a/queries/ruby/highlights.scm b/queries/ruby/highlights.scm
index c350e5ad1..9488297b4 100644
--- a/queries/ruby/highlights.scm
+++ b/queries/ruby/highlights.scm
@@ -173,13 +173,30 @@
(float) @float
[
- (nil)
(true)
(false)
] @boolean
-(comment) @comment
-(comment) @spell
+(nil) @constant.builtin
+
+(comment) @comment @spell
+
+(program
+ (comment)+ @comment.documentation
+ (class))
+
+(module
+ (comment)+ @comment.documentation
+ (body_statement (class)))
+
+(class
+ (comment)+ @comment.documentation
+ (body_statement (method)))
+
+(body_statement
+ (comment)+ @comment.documentation
+ (method))
+
(string_content) @spell
; Operators