NeoVim

hitt can be run directly from Neovim.

Install

Note: The hitt executable must be available in your path for the plugin to work.

Lazy

local hitt_plugin = {
    "hougesen/hitt",
    opts = {},
}

Usage

The plugin exposes a single command :HittSendRequest, which can be bound to a keymap like this:

-- ~/.config/nvim/after/plugin/hitt.lua

local hitt = require("hitt")

vim.keymap.set("n", "<leader>rr", hitt.HittSendRequest, {})

hitt neovim window

Server sent events (SSE)

Listening to server sent events is not possible in NeoVim (yet).

Configuration

NameDefaultDescription
window_width80Window width in percentage
window_height80Window height in percentage
fail_fastfalseEnables the --fail-fast options

HTTP syntax highlighting

Syntax highlighting can be enabled by installing the http treesitter parser (:TSInstall http) and adding a file association for .http files.

vim.filetype.add({
    extension = {
        http = "http",
    },
})