Install which-key

This commit is contained in:
ekzyis 2024-04-22 19:05:09 +02:00
parent 324bd8e74e
commit 9abc1b12be
5 changed files with 19 additions and 5 deletions

View File

@ -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" }
}

View File

@ -1,3 +1,3 @@
vim.g.mapleader = " "
-- lazy
vim.keymap.set("n", "<leader>l", vim.cmd.Lazy)
vim.keymap.set("n", "<leader>l", vim.cmd.Lazy, { desc = "Open Lazy plugin manager" })

View File

@ -11,7 +11,7 @@ return {
require('nvim-tree').setup()
local api = require('nvim-tree.api')
vim.keymap.set('n', '<leader>e', api.tree.open)
vim.keymap.set('n', '<leader>E', api.tree.close)
vim.keymap.set('n', '<leader>e', api.tree.open, { desc = "Open file explorer" })
vim.keymap.set('n', '<leader>E', api.tree.close, { desc = "Close file explorer" })
end
}

View File

@ -1,6 +1,6 @@
local telescope_config = function()
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>p", builtin.find_files)
vim.keymap.set("n", "<leader>p", builtin.find_files, { desc = "Find files" })
end
return {

13
lua/plugins/which-key.lua Normal file
View File

@ -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
}
}