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, {})
Server sent events (SSE)
Listening to server sent events is not possible in NeoVim (yet).
Configuration
Name | Default | Description |
---|---|---|
window_width | 80 | Window width in percentage |
window_height | 80 | Window height in percentage |
fail_fast | false | Enables 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",
},
})