2 files changed,
31 insertions(+),
10 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2026-04-19 22:44:58 +0300
Authored at:
2026-04-19 22:42:23 +0300
Change ID:
ytlsmursnkmtlznmsvvrssnklrwrzvzq
Parent:
a695cb7
jump to
| M | lua/curl.lua |
| A | readme |
M
lua/curl.lua
··· 326 326 327 327 function H.write_formatted_output(output) 328 328 if output == "" or vim.fn.executable "jq" ~= 1 then 329 - vim.schedule(function() 330 - H.write_output(output, false) 331 - end) 329 + vim.schedule(function() H.write_output(output, false) end) 332 330 return 333 331 end 334 332 ··· 341 339 end 342 340 end 343 341 if not json_index then 344 - vim.schedule(function() 345 - H.write_output(output, false) 346 - end) 342 + vim.schedule(function() H.write_output(output, false) end) 347 343 return 348 344 end 349 345 ··· 358 354 if result.code == 0 and result.stdout and result.stdout ~= "" then 359 355 is_json = true 360 356 text = #headers > 0 and (table.concat(headers, "\n") .. "\n" .. result.stdout) 361 - or result.stdout 357 + or result.stdout 362 358 end 363 - vim.schedule(function() 364 - H.write_output(text, is_json) 365 - end) 359 + vim.schedule(function() H.write_output(text, is_json) end) 366 360 end) 367 361 end 368 362
A
readme
··· 1 +curl.nvim 2 +--------- 3 + 4 +simple curl integration to neovim 5 + 6 + 7 +INSTILL 8 + 9 + vim.pack.add { "https://github.com/olexsmir/curl.nvim" } 10 + require("curl").setup {} 11 + 12 +CONFIGURATION 13 + 14 + require("curl").setup { 15 + curl = nil, -- path to binary, leave nil to use one in $PATH 16 + default_flags = { "-i" }, -- by default {} 17 + open_cmd = "vsplit", 18 + map_execute = "<CR>", 19 + } 20 + 21 +LICENSE 22 + 23 + "THE BEERWARE LICENSE" (Revision 42): 24 + Oleksandr Smirnov wrote this code. As long as you retain this 25 + notice, you can do whatever you want with this stuff. If we 26 + meet someday, and you think this stuff is worth it, you can 27 + buy me a beer in return.