File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ local rest = {}
33local curl = require (' plenary.curl' )
44local path = require (' plenary.path' )
55local utils = require (' rest-nvim.utils' )
6+ local log = require (' plenary.log' ).new { plugin = ' rest.nvim' , level = ' warn' }
67
78-- setup is needed for enabling syntax highlighting for http files
89rest .setup = function ()
@@ -180,9 +181,7 @@ local function get_headers(bufnr, query_line)
180181 break
181182 end
182183 if not line_content :find (' :' ) then
183- print (
184- ' [rest.nvim] Missing Key/Value pair in message header. Ignoring entry'
185- )
184+ log .warn (" Missing Key/Value pair in message header. Ignoring line: " , line_content )
186185 goto continue
187186 end
188187
@@ -356,10 +355,9 @@ rest.run = function(verbose)
356355 })
357356
358357 if not success_req then
359- error (
358+ vim . api . nvim_err_writeln (
360359 ' [rest.nvim] Failed to perform the request.\n Make sure that you have entered the proper URL and the server is running.\n\n Traceback: '
361- .. req_err ,
362- 2
360+ .. req_err
363361 )
364362 end
365363end
You can’t perform that action at this time.
0 commit comments