aboutsummaryrefslogtreecommitdiffstats
path: root/queries/ruby
diff options
context:
space:
mode:
authorderekstride <derek.stride@shopify.com>2021-04-15 15:48:48 -0230
committerThomas Vigouroux <tomvig38@gmail.com>2021-06-04 07:47:21 +0200
commite98e2eafa29958a414e5785f58a9cbda117c1bf1 (patch)
tree78f625a1d949f82cca5f08928fcca49be361a772 /queries/ruby
parentFix 1359: nil check for version in health-check (diff)
downloadnvim-treesitter-e98e2eafa29958a414e5785f58a9cbda117c1bf1.tar
nvim-treesitter-e98e2eafa29958a414e5785f58a9cbda117c1bf1.tar.gz
nvim-treesitter-e98e2eafa29958a414e5785f58a9cbda117c1bf1.tar.bz2
nvim-treesitter-e98e2eafa29958a414e5785f58a9cbda117c1bf1.tar.lz
nvim-treesitter-e98e2eafa29958a414e5785f58a9cbda117c1bf1.tar.xz
nvim-treesitter-e98e2eafa29958a414e5785f58a9cbda117c1bf1.tar.zst
nvim-treesitter-e98e2eafa29958a414e5785f58a9cbda117c1bf1.zip
downcase! directive to use with ruby injections
``` (#downcase! "language") ``` downcase! will ensure the metadata value for the specified key will be downcased. If the value is a node, it will downcase the text specified by the node. ``` (#downcase! @node "key") ``` You can also namespace the key with a specific capture, similar to how you can call `(#set! @node "key" "value")`
Diffstat (limited to 'queries/ruby')
-rw-r--r--queries/ruby/injections.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/queries/ruby/injections.scm b/queries/ruby/injections.scm
index 4bb7d675d..89bb058a6 100644
--- a/queries/ruby/injections.scm
+++ b/queries/ruby/injections.scm
@@ -1 +1,7 @@
(comment) @comment
+
+(heredoc_body
+ (heredoc_content) @content
+ (heredoc_end) @language
+ (#set! "language" @language)
+ (#downcase! "language"))