https://github.com/abidibo/nvim-httpyac
A simple plugin which integrates HttpYac in Neovim
https://github.com/abidibo/nvim-httpyac
Last synced: 3 months ago
JSON representation
A simple plugin which integrates HttpYac in Neovim
- Host: GitHub
- URL: https://github.com/abidibo/nvim-httpyac
- Owner: abidibo
- License: mit
- Created: 2024-06-21T13:56:22.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-20T10:26:50.000Z (3 months ago)
- Last Synced: 2026-01-20T19:41:22.540Z (3 months ago)
- Language: Lua
- Size: 144 KB
- Stars: 13
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim-sorted - abidibo/nvim-httpyac
- awesome-neovim - abidibo/nvim-httpyac - Provides integration with `httpYac`. (Programming Languages Support / Web Development)
README
# Neovim HttpYac

A very simple plugin which integrates [HttpYac](https://httpyac.github.io/) in Neovim.
I currently use it to to run REST requests, I don't need much, but I'll add functionalities once I need them.
It basically runs httpyac cli against the current file, executing all request or the one under the cursor, so you can use vars, envs, etc...
It provides syntax highlighting for the responses.
> [!IMPORTANT]
> You need to have [HttpYac](https://httpyac.github.io/) installed and in path!
i.e. `npm install -g httpyac`
## Installation
With [LazyVim](https://github.com/LazyVim/LazyVim):
```lua
return {
"abidibo/nvim-httpyac",
config = function ()
require('nvim-httpyac').setup({
output_view = "vertical" -- "vertical" | "horizontal"
})
-- if you want to set up the keymaps
vim.keymap.set('n', 'rr', ':NvimHttpYac', { desc='Run request'})
vim.keymap.set('n', 'ra', ':NvimHttpYacAll', { desc='Run all requests'})
vim.keymap.set('n', 'rp', ':NvimHttpYacPicker', { desc='Run named request'})
end
}
```
## Configuration
You can configure the plugin by passing a table to the `setup` function.
- `output_view`: Defines how the output window is opened. Can be `"vertical"` (default) or `"horizontal"`.
## Commands
> [!TIP]
> It's not mandatory to save the file before running the requests,the current buffer content will be used
- **NvimHttpYac**: executes the request under the cursor
- **NvimHttpYacAll**: executes all the requests
- **NvimHttpYacPicker**: shows a picker with all the named requests
Both commands take optional parameters that are passed to `httpyac`.
E.g. to use a specific dev environment call `:NvimHttpYac --env dev`
## Credits
This plugin was inspired by the following projects:
- [HttpYac](https://httpyac.github.io/): for the great cli tool
- [rest.nvim](https://github.com/rest-nvim/rest.nvim): for the syntax highlighting
- [vimyac](https://github.com/oxcafedead/vimyac): for the idea