You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,6 +234,22 @@ conflicts with any of your existing ones.
234
234
235
235
See `:h rest-nvim.commands` for more info
236
236
237
+
### Lua scripting
238
+
239
+
```http
240
+
http://localhost:8000
241
+
242
+
# @lang=lua
243
+
> {%
244
+
local json = vim.json.decode(response.body)
245
+
json.data = "overwritten"
246
+
response.body = vim.json.encode(json)
247
+
%}
248
+
```
249
+
250
+
Put `# @lang=lua` comment just above any script elements.
251
+
Scripts without `@lang` will be parsed as javascript code to match with [http spec](https://www.jetbrains.com/help/idea/exploring-http-syntax.html#response-handling)
0 commit comments