Files
nvim/lua/plugins/which-key.lua

32 lines
567 B
Lua

local function config()
--- Ensure plugin is avaiable
local wk = require("which-key")
--- Global options
vim.o.timeout = true
vim.o.timeoutlen = 300
--- Add description to leader group
wk.register({
n = {
name = "NoHighLight",
},
e = {
name = "NvimTree",
},
f = {
name = "Telescope"
},
}, { prefix = "<leader>" })
--- Override keymap
local km = vim.keymap.set
km('n', '<C-s>', ':WhichKey<cr>', { desc = "Which-key" })
end
return {
"folke/which-key.nvim",
event = "VeryLazy",
config = config
}