Skip to content

Commit

Permalink
feat(programming-language-support): Add support for rest-nvim (#384)
Browse files Browse the repository at this point in the history
* feat(programming-language-support): Add support for rest-nvim

* fix(rest-nvim): Use opts

* Update lua/astrocommunity/programming-language-support/rest-nvim/README.md

Co-authored-by: Oli <57495944+owittek@users.noreply.github.com>

* Update lua/astrocommunity/programming-language-support/rest-nvim/init.lua

Co-authored-by: Oli <57495944+owittek@users.noreply.github.com>

* Update lua/astrocommunity/programming-language-support/rest-nvim/init.lua

Co-authored-by: Oli <57495944+owittek@users.noreply.github.com>

* Update lua/astrocommunity/programming-language-support/rest-nvim/init.lua

Co-authored-by: Micah Halter <micah@mehalter.com>

---------

Co-authored-by: Oli <57495944+owittek@users.noreply.github.com>
Co-authored-by: Micah Halter <micah@mehalter.com>
  • Loading branch information
3 people authored Jul 9, 2023
1 parent 80a781b commit 74393f5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Rest.nvim

A fast Neovim http client written in Lua.

### Dependencies
- System-wide
- curl
- Optional (can be changed, see config below)
- jq (to format JSON output)
- tidy (to format HTML output)

**Repository:** : <https://github.com/rest-nvim/rest.nvim>
29 changes: 29 additions & 0 deletions lua/astrocommunity/programming-language-support/rest-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
local prefix = "<leader>r"
local utils = require "astronvim.utils"

return {
{
"rest-nvim/rest.nvim",
ft = { "http", "json" },
cmd = {
"RestNvim",
"RestNvimPreview",
"RestNvimLast",
},
dependencies = { "nvim-lua/plenary.nvim" },

keys = {
{ prefix, desc = "RestNvim" },
{ prefix .. "r", "<Plug>RestNvim", desc = "Run request" },
},
opts = {},
},
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if opts.ensure_installed ~= "all" then
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "http", "json" })
end
end,
},
}

0 comments on commit 74393f5

Please sign in to comment.