@@ -46,7 +46,7 @@ local function run_request(req)
4646 local ok , res = pcall (client .request (req ).wait )
4747 if not ok then
4848 logger .error (" request failed" )
49- vim .notify (" request failed" , vim .log .levels .ERROR )
49+ vim .notify (" [rest.nvim] request failed" , vim .log .levels .ERROR )
5050 return
5151 end
5252 --- @cast res rest.Response
@@ -83,7 +83,7 @@ function M.run()
8383 local req_node = parser .get_cursor_request_node ()
8484 if not req_node then
8585 logger .error (" failed to find request at cursor position" )
86- vim .notify (" failed to find request at cursor position" , vim .log .levels .ERROR )
86+ vim .notify (" [rest.nvim] failed to find request at cursor position" , vim .log .levels .ERROR )
8787 return
8888 end
8989 local ctx = parser .create_context (0 )
@@ -93,7 +93,7 @@ function M.run()
9393 local req = parser .parse (req_node , 0 , ctx )
9494 if not req then
9595 logger .error (" failed to parse request" )
96- vim .notify (" failed to parse request" , vim .log .levels .ERROR )
96+ vim .notify (" [rest.nvim] failed to parse request" , vim .log .levels .ERROR )
9797 return
9898 end
9999 local highlight = config .highlight
@@ -108,7 +108,7 @@ function M.run_by_name(name)
108108 local req_node = parser .get_request_node_by_name (name )
109109 if not req_node then
110110 logger .error (" failed to find request by name: " .. name )
111- vim .notify (" failed to find request by name: " .. name , vim .log .levels .ERROR )
111+ vim .notify (" [rest.nvim] failed to find request by name: " .. name , vim .log .levels .ERROR )
112112 return
113113 end
114114 local ctx = parser .create_context (0 )
@@ -118,7 +118,7 @@ function M.run_by_name(name)
118118 local req = parser .parse (req_node , 0 , ctx )
119119 if not req then
120120 logger .error (" failed to parse request" )
121- vim .notify (" failed to parse request" , vim .log .levels .ERROR )
121+ vim .notify (" [rest.nvim] failed to parse request" , vim .log .levels .ERROR )
122122 return
123123 end
124124 local highlight = config .highlight
132132function M .run_last ()
133133 local req = rest_nvim_last_request
134134 if not req then
135- vim .notify (" No last request found" , vim .log .levels .WARN )
135+ vim .notify (" [rest.nvim] No last request found" , vim .log .levels .WARN )
136136 return false
137137 end
138138 run_request (req )
@@ -145,13 +145,13 @@ function M.run_all()
145145 for _ , req_node in ipairs (reqs ) do
146146 local req = parser .parse (req_node , 0 , ctx )
147147 if not req then
148- vim .notify (" Parsing request failed. See `:Rest logs` for more info" , vim .log .levels .ERROR )
148+ vim .notify (" [rest.nvim] Parsing request failed. See `:Rest logs` for more info" , vim .log .levels .ERROR )
149149 return false
150150 end
151151 -- FIXME: wait for previous request ends
152152 local ok = run_request (req )
153153 if not ok then
154- vim .notify (" Running request failed. See `:Rest logs` for more info" , vim .log .levels .ERROR )
154+ vim .notify (" [rest.nvim] Running request failed. See `:Rest logs` for more info" , vim .log .levels .ERROR )
155155 return
156156 end
157157 end
0 commit comments