2023-11-18 02:27:14 +02:00
|
|
|
-- Display possible keybinds
|
2023-11-25 14:13:26 +02:00
|
|
|
-- Here I have also defined some generic keybinds
|
2023-11-18 02:27:14 +02:00
|
|
|
-- Plugin specific keybinds are set up in plugin configuration file
|
2023-11-25 14:37:36 +02:00
|
|
|
--- @type LazyPluginSpec
|
2023-11-18 02:27:14 +02:00
|
|
|
return {
|
|
|
|
"folke/which-key.nvim",
|
|
|
|
config = function()
|
|
|
|
local wk = require("which-key")
|
2023-11-21 22:28:54 +02:00
|
|
|
wk.setup()
|
2023-06-27 12:39:51 +03:00
|
|
|
|
2023-11-18 02:27:14 +02:00
|
|
|
wk.register({
|
2023-11-25 14:13:26 +02:00
|
|
|
h = { "<cmd>nohlsearch<cr>", "Turn off search highlight" },
|
2023-11-18 02:27:14 +02:00
|
|
|
}, { prefix = "<leader>" })
|
2023-06-27 12:39:51 +03:00
|
|
|
|
2023-11-18 02:27:14 +02:00
|
|
|
wk.register({
|
2023-11-25 14:13:26 +02:00
|
|
|
["<C-n>"] = { "<cmd>bnext<cr>", "Next buffer" },
|
|
|
|
["<C-b>"] = { "<cmd>bprevious<cr>", "Previous buffer" },
|
2023-11-18 02:27:14 +02:00
|
|
|
})
|
2023-06-27 12:39:51 +03:00
|
|
|
|
2023-11-18 02:27:14 +02:00
|
|
|
-- Exit terminal insert mode with esc
|
|
|
|
vim.keymap.set("t", "<Esc>", "<C-\\><C-n>", {})
|
|
|
|
end,
|
|
|
|
}
|