diff --git a/lua/astrocommunity/programming-language-support/rest-nvim/init.lua b/lua/astrocommunity/programming-language-support/rest-nvim/init.lua index f9182e04b..c43a449f1 100644 --- a/lua/astrocommunity/programming-language-support/rest-nvim/init.lua +++ b/lua/astrocommunity/programming-language-support/rest-nvim/init.lua @@ -1,31 +1,34 @@ return { { "rest-nvim/rest.nvim", - ft = { "http", "json" }, - cmd = { - "RestNvim", - "RestNvimPreview", - "RestNvimLast", - }, + ft = "http", + cmd = "Rest", dependencies = { - "nvim-lua/plenary.nvim", + { + "vhyrro/luarocks.nvim", + priority = 1000, + config = true, + }, { "AstroNvim/astrocore", opts = function(_, opts) local maps = opts.mappings local prefix = "r" maps.n[prefix] = { desc = "RestNvim" } - maps.n[prefix .. "r"] = { "RestNvim", desc = "Run request" } + maps.n[prefix .. "r"] = { "Rest run", desc = "Run request under the cursor" } + maps.n[prefix .. "l"] = { "Rest run last", desc = "Re-run latest request" } end, }, }, + main = "rest-nvim", opts = {}, }, { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) if opts.ensure_installed ~= "all" then - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "http", "json" }) + opts.ensure_installed = + require("astrocore").list_insert_unique(opts.ensure_installed, { "lua", "xml", "http", "json", "graphql" }) end end, },