2024-06-27 00:49:17 +00:00
|
|
|
return {
|
|
|
|
"folke/which-key.nvim",
|
|
|
|
event = "VeryLazy",
|
|
|
|
init = function()
|
|
|
|
vim.o.timeout = true
|
|
|
|
vim.o.timeoutlen = 300
|
|
|
|
end,
|
|
|
|
config = function()
|
|
|
|
local wk = require("which-key")
|
|
|
|
-- f key register
|
|
|
|
wk.register({
|
|
|
|
f = {
|
2024-06-30 01:17:15 +00:00
|
|
|
name = "Files",
|
|
|
|
b = { "<cmd>Telescope buffers<cr>", "Find Buffer" },
|
|
|
|
f = { "<cmd>Telescope find_files<cr>", "Find File" },
|
|
|
|
r = { "<cmd>Telescope oldfiles<cr>", "Open Recent File" },
|
|
|
|
s = { "<cmd>Telescope live_grep<cr>", "Search Word" },
|
|
|
|
t = { "<cmd>Telescope tags<cr>", "Find Tag" },
|
|
|
|
w = { "<cmd>Telescope grep_string<cr>", "Find Word" },
|
2024-06-27 00:49:17 +00:00
|
|
|
}
|
|
|
|
}, { prefix = "<leader>" })
|
|
|
|
|
|
|
|
|
|
|
|
-- q key register
|
|
|
|
wk.register({
|
|
|
|
q = {"<cmd>bdelete<cr>", "Close Buffer"}
|
|
|
|
}, { prefix = "<leader>" })
|
|
|
|
|
|
|
|
end
|
|
|
|
}
|