A Neovim plugin that provides a REST client interface for making HTTP requests directly from your editor. Ideal for API testing and development workflows.
- Execute HTTP requests directly from Neovim
- Interactive REST client dashboard
- Support for
.rest
files to define API requests - View and edit request headers, body, and URL
- Toggle between horizontal and vertical layouts
- Supports all major HTTP methods: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD
- Seamless integration with
nui.nvim
andplenary.nvim
- Support for using environment variables in
.rest
files and dashboard
- nui.nvim - UI components
- plenary.nvim - Lua utilities and HTTP client
Install with your preferred package manager:
{
"marco-souza/rest.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim"
},
config = function()
require("rest").setup()
end,
}
The plugin provides the following commands:
:Rest open
- Opens the REST client dashboard:Rest close
- Closes the REST client dashboard
You can create .rest
files to define your API requests. When you open the REST dashboard with a .rest
file active, its content will be loaded into the dashboard.
Example REST file format:
GET https://api.example.com/users
# Headers
Content-Type: application/json
Authorization: Bearer your-token-here
# Body
{"query": "example"}
Once you have the dashboard open:
- Edit your request in the left panel
- Press
<C-s>
to execute the request - View the response in the right panel
- Press
r
to toggle between horizontal and vertical layout - Press
q
to close the dashboard
- First line:
METHOD URL
(e.g.,GET https://api.example.com
) - Headers:
Key: Value
format, one per line - Body: Everything after headers (JSON format supported)
- Comments: Lines starting with
#
are treated as comments
- GET
- POST
- PUT
- DELETE
- PATCH
- OPTIONS
- HEAD
MIT License. See LICENSE for details.