From 81e6d345849eace49410bc30bc0138d6e437dc69 Mon Sep 17 00:00:00 2001 From: serxoz Date: Mon, 23 Oct 2023 14:49:56 +0200 Subject: [PATCH] =?UTF-8?q?revisa=20versi=C3=B3s=20das=20dependencias=20no?= =?UTF-8?q?s=20packages.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/after/plugin/package-info.lua | 24 ++++++++++++++++++++++++ nvim/lua/serxoz/packer.lua | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 nvim/after/plugin/package-info.lua diff --git a/nvim/after/plugin/package-info.lua b/nvim/after/plugin/package-info.lua new file mode 100644 index 0000000..109f533 --- /dev/null +++ b/nvim/after/plugin/package-info.lua @@ -0,0 +1,24 @@ +local pkg_info = require('package-info') + +pkg_info.setup() + +-- Show dependency versions +vim.keymap.set({ "n" }, "ns", require("package-info").show, { silent = true, noremap = true }) + +-- Hide dependency versions +vim.keymap.set({ "n" }, "nc", require("package-info").hide, { silent = true, noremap = true }) + +-- Toggle dependency versions +vim.keymap.set({ "n" }, "nt", require("package-info").toggle, { silent = true, noremap = true }) + +-- Update dependency on the line +vim.keymap.set({ "n" }, "nu", require("package-info").update, { silent = true, noremap = true }) + +-- Delete dependency on the line +vim.keymap.set({ "n" }, "nd", require("package-info").delete, { silent = true, noremap = true }) + +-- Install a new dependency +vim.keymap.set({ "n" }, "ni", require("package-info").install, { silent = true, noremap = true }) + +-- Install a different dependency version +vim.keymap.set({ "n" }, "np", require("package-info").change_version, { silent = true, noremap = true }) diff --git a/nvim/lua/serxoz/packer.lua b/nvim/lua/serxoz/packer.lua index 272ef66..7625aa6 100644 --- a/nvim/lua/serxoz/packer.lua +++ b/nvim/lua/serxoz/packer.lua @@ -69,6 +69,10 @@ return require('packer').startup(function(use) 'nvim-lualine/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true } }) + use({ + "vuki656/package-info.nvim", + requires = "MunifTanjim/nui.nvim", + }) end)