|
|
|
@ -21,12 +21,18 @@ keymap("n", "<H>", "<Nop>", opts)
|
|
|
|
|
keymap("n", "<L>", "<Nop>", opts)
|
|
|
|
|
keymap("n", "<M-L>", ":BufferLineMoveNext<CR>", opts)
|
|
|
|
|
keymap("n", "<M-H>", ":BufferLineMovePrev<CR>", opts)
|
|
|
|
|
|
|
|
|
|
function go_to_buffer(buffer)
|
|
|
|
|
return function()
|
|
|
|
|
require("bufferline").go_to(buffer, true)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
for _, mode in ipairs({ "n", "i", "v" }) do
|
|
|
|
|
vim.keymap.set(mode, "<A-1>", "<Cmd>BufferLineGoToBuffer 1<CR>", { noremap = true, silent = true })
|
|
|
|
|
vim.keymap.set(mode, "<A-2>", "<Cmd>BufferLineGoToBuffer 2<CR>", { noremap = true, silent = true })
|
|
|
|
|
vim.keymap.set(mode, "<A-3>", "<Cmd>BufferLineGoToBuffer 3<CR>", { noremap = true, silent = true })
|
|
|
|
|
vim.keymap.set(mode, "<A-4>", "<Cmd>BufferLineGoToBuffer 4<CR>", { noremap = true, silent = true })
|
|
|
|
|
vim.keymap.set(mode, "<A-5>", "<Cmd>BufferLineGoToBuffer 5<CR>", { noremap = true, silent = true })
|
|
|
|
|
for i = 1, 8 do
|
|
|
|
|
vim.keymap.set(mode, "<A-" .. i .. ">", go_to_buffer(i), { noremap = true, silent = true })
|
|
|
|
|
end
|
|
|
|
|
vim.keymap.set(mode, "<A-9>", go_to_buffer(-1), { noremap = true, silent = true })
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- Clear highlights
|
|
|
|
@ -114,3 +120,9 @@ keymap("n", "<F11>", "<cmd>DapStepInto<CR>")
|
|
|
|
|
keymap("n", "<S-F11>", "<cmd>DapStepOut<CR>")
|
|
|
|
|
|
|
|
|
|
vim.keymap.set("n", "K", require("noice.lsp").hover, { noremap = true, silent = true })
|
|
|
|
|
|
|
|
|
|
local function dismiss_notifications()
|
|
|
|
|
require("notify").dismiss({ silent = true, pending = true })
|
|
|
|
|
vim.cmd("noh")
|
|
|
|
|
end
|
|
|
|
|
vim.keymap.set("n", "<Esc>", dismiss_notifications, { desc = "Dismiss notifications" })
|
|
|
|
|