@@ -37,6 +37,7 @@ CLI. For more information on this, please see this [blog post](https://amartin.c
3737- Set custom pre-request and post-request hooks to dynamically interact with the data
3838- Easily set environment variables based on the response to re-use the data later
3939- Tree-sitter based parsing and syntax highlighting for speed and perfect accuracy
40+ - Format response body with native ` gq ` command
4041- Possibility of using dynamic/environment variables and Lua scripting in HTTP files
4142- Save received cookies and load them automatically
4243
@@ -48,11 +49,7 @@ CLI. For more information on this, please see this [blog post](https://amartin.c
4849
4950### Dependencies
5051
51- - System-wide
52- - ` curl `
53- - Optional [ can be changed, see config below] ( #default-configuration )
54- - ` jq ` (to format JSON output)
55- - ` tidy ` (to format HTML output)
52+ - ` curl `
5653
5754### [ rocks.nvim] ( https://github.com/nvim-neorocks/rocks.nvim ) (recommended)
5855
@@ -109,31 +106,9 @@ local default_config = {
109106 hooks = {
110107 --- @type boolean Decode the request URL segments on response UI to improve readability
111108 decode_url = true ,
112- --- @type boolean Format the response body
109+ --- @type boolean Format the response body using ` gq ` command
113110 format = true ,
114111 },
115- --- @type table<string,RestResultFormatter>
116- formatters = {
117- json = " jq" ,
118- html = function (body )
119- if vim .fn .executable (" tidy" ) == 0 then
120- return body , { found = false , name = " tidy" }
121- end
122- -- stylua: ignore
123- local fmt_body = vim .fn .system ({
124- " tidy" ,
125- " -i" ,
126- " -q" ,
127- " --tidy-mark" , " no" ,
128- " --show-body-only" , " auto" ,
129- " --show-errors" , " 0" ,
130- " --show-warnings" , " 0" ,
131- " -" ,
132- }, body ):gsub (" \n $" , " " )
133-
134- return fmt_body , { found = true , name = " tidy" }
135- end ,
136- },
137112 },
138113 --- @class rest.Config.Clients
139114 clients = {
@@ -160,7 +135,7 @@ local default_config = {
160135 --- @type boolean
161136 enable = true ,
162137 --- @type string
163- pattern = " %.env.*"
138+ pattern = " .* %.env.*"
164139 },
165140 --- @class rest.Config.UI
166141 ui = {
0 commit comments