Files
nvim-http/plugin/nvim-http.lua
T
2026-03-19 17:01:27 +01:00

18 lines
556 B
Lua

local ok, nvim_http = pcall(require, "nvim_http")
if not ok then
vim.notify("Failed to load nvim_http: " .. tostring(nvim_http), vim.log.levels.ERROR)
return
end
vim.notify("nvim_http loaded successfully", vim.log.levels.INFO)
vim.api.nvim_create_user_command("NvimHttpRun", function()
nvim_http.run_http_under_cursor()
end, {
desc = "Run HTTP command under cursor and open Telescope response tree",
})
-- Set up keybinding
vim.keymap.set('n', '<leader>hr', function()
nvim_http.run_http_under_cursor()
end, { desc = "Run HTTP under cursor" })