diff --git a/lazy-lock.json b/lazy-lock.json index 4a3bda3..d1652ce 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,5 +4,6 @@ "nvim-tree.lua": { "branch": "master", "commit": "ddd1d6eb21c45433bdc65cc8015f2457998f2bf2" }, "nvim-web-devicons": { "branch": "master", "commit": "beb6367ab8496c9e43f22e0252735fdadae1872d" }, "plenary.nvim": { "branch": "master", "commit": "5129a3693c482fcbc5ab99a7706ffc4360b995a0" }, - "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" } + "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index c1ed378..2d09b14 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,3 +1,3 @@ vim.g.mapleader = " " -- lazy -vim.keymap.set("n", "l", vim.cmd.Lazy) +vim.keymap.set("n", "l", vim.cmd.Lazy, { desc = "Open Lazy plugin manager" }) diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua index 44fe0b7..ade4ab5 100644 --- a/lua/plugins/nvim-tree.lua +++ b/lua/plugins/nvim-tree.lua @@ -11,7 +11,7 @@ return { require('nvim-tree').setup() local api = require('nvim-tree.api') - vim.keymap.set('n', 'e', api.tree.open) - vim.keymap.set('n', 'E', api.tree.close) + vim.keymap.set('n', 'e', api.tree.open, { desc = "Open file explorer" }) + vim.keymap.set('n', 'E', api.tree.close, { desc = "Close file explorer" }) end } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index de40c2f..07e8038 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,6 +1,6 @@ local telescope_config = function() local builtin = require("telescope.builtin") - vim.keymap.set("n", "p", builtin.find_files) + vim.keymap.set("n", "p", builtin.find_files, { desc = "Find files" }) end return { diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua new file mode 100644 index 0000000..6f820e0 --- /dev/null +++ b/lua/plugins/which-key.lua @@ -0,0 +1,13 @@ +return { + "folke/which-key.nvim", + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 300 + end, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + } +}