Skip to content

Commit 58e8bca

Browse files
fix: injection queries
1 parent 7c100f2 commit 58e8bca

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

queries/http/injections.scm

+10
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,13 @@
2626
(_
2727
(script) @injection.content
2828
(#offset! @injection.content 0 2 0 -2)))
29+
30+
((request
31+
(comment
32+
name: (_) @_name
33+
(#eq? @_name "lang")
34+
value: (_) @injection.language))
35+
.
36+
(res_handler_script
37+
(script) @injection.content
38+
(#offset! @injection.content 0 2 0 -2)))

rest.nvim-scm-1.rockspec

+1
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,6 @@ build = {
5252
"plugin",
5353
"ftdetect",
5454
"ftplugin",
55+
"queries",
5556
}
5657
}

spec/examples/script/post_request_script.http

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### post-request script
22
GET https://jsonplaceholder.typicode.com/posts/3
33

4+
# @lang=lua
45
> {%
56
local body = vim.json.decode(response.body)
67
client.global.set("postId", body.id)

0 commit comments

Comments
 (0)