mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(util): Add kulala REST-client
Kulala is a minimal REST-client implementation that allows you to make HTTP requests from within Neovim
This commit is contained in:
parent
d35a3914bf
commit
b41b8357c8
1 changed files with 28 additions and 0 deletions
28
lua/lazyvim/plugins/extras/util/rest.lua
Normal file
28
lua/lazyvim/plugins/extras/util/rest.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
vim.filetype.add({
|
||||
extension = {
|
||||
["http"] = "http",
|
||||
},
|
||||
})
|
||||
return {
|
||||
{
|
||||
"mistweaverco/kulala.nvim",
|
||||
ft = "http",
|
||||
keys = {
|
||||
{ "<leader>rs", "<cmd>lua require('kulala').run()<cr>", desc = "Send the request" },
|
||||
{ "<leader>rt", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body" },
|
||||
{ "<leader>rp", "<cmd>lua require('kulala').jump_prev()<cr>", desc = "Jump to previous request" },
|
||||
{ "<leader>rn", "<cmd>lua require('kulala').jump_next()<cr>", desc = "Jump to next request" },
|
||||
},
|
||||
config = function()
|
||||
require("kulala").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "http", "lua", "xml", "json", "graphql" })
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue