Nvim: Move some keybinds to which-key
This commit is contained in:
parent
89d4ea3737
commit
e141efbbe4
5 changed files with 19 additions and 14 deletions
17
home/.config/nvim/lua/plugins/which-key.lua
Normal file
17
home/.config/nvim/lua/plugins/which-key.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
return function()
|
||||
local wk = require("which-key")
|
||||
wk.setup({})
|
||||
|
||||
wk.register({
|
||||
f = { "<cmd>Neoformat<CR>", "Format with Neoformat" },
|
||||
h = { "<cmd>nohlsearch<CR>", "Turn off search highlight" },
|
||||
}, { prefix = "<leader>" })
|
||||
|
||||
wk.register({
|
||||
["<C-n>"] = { "<cmd>bnext<CR>", "Next buffer" },
|
||||
["<C-b>"] = { "<cmd>bprevious<CR>", "Previous buffer" },
|
||||
})
|
||||
|
||||
-- Exit terminal insert mode with esc
|
||||
vim.keymap.set("t", "<Esc>", "<C-\\><C-n>", {})
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue