Skip to content

A simple plugin which integrates HttpYac in Neovim

License

Notifications You must be signed in to change notification settings

abidibo/nvim-httpyac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neovim HttpYac

Screenshot

A very simple plugin which integrates HttpYac 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 installed and in path! i.e. npm install -g httpyac

Installation

With LazyVim:

return {
  "abidibo/nvim-httpyac",
  config = function ()
    require('nvim-httpyac').setup()
    -- if you want to set up the keymaps
    vim.keymap.set('n', '<Leader>rr', '<cmd>:NvimHttpYac<CR>', { desc='Run request'})
    vim.keymap.set('n', '<Leader>ra', '<cmd>:NvimHttpYacAll<CR>', { desc='Run all requests'})
  end
}

Commands

  • NvimHttpYac: executes the request under the cursor
  • NvimHttpYacAll: executes all the 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:

About

A simple plugin which integrates HttpYac in Neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published