dotfiles/nvim/custom/mappings.lua

66 lines
1.4 KiB
Lua

local M = {}
M.general = {
n = {
["<leader> "] = { ":noh<CR>", "Clean search highlight" },
["<leader>d"] = { "\"_d", "Delete without yank" },
},
v = {
["J"] = { ":m '>+1<CR>gv=gv", "Move visual block up" },
["K"] = { ":m '<-2<CR>gv=gv", "Move visual block down" },
["<"] = { "<gv", "Keep visual on shift" },
[">"] = { ">gv", "Keep visual on shift" },
["<leader>d"] = { "\"_d", "Delete without yank" },
}
}
M.harpoon = {
n = {
["<leader>ss"] = {
function()
require("harpoon.ui").toggle_quick_menu()
end,
" harpoon show menu"
},
["<leader>sa"] = {
function()
require("harpoon.mark").add_file()
end,
" harpoon add file"
},
["<leader>su"] = {
function()
require("harpoon.ui").nav_file(1)
end,
" harpoon go to file 1"
},
["<leader>si"] = {
function()
require("harpoon.ui").nav_file(2)
end,
" harpoon go to file 2"
},
["<leader>so"] = {
function()
require("harpoon.ui").nav_file(3)
end,
" harpoon go to file 3"
},
["<leader>sp"] = {
function()
require("harpoon.ui").nav_file(4)
end,
" harpoon go to file 4"
},
}
}
M.telescope = {
n = {
["<leader>fg"] = { "<cmd> Telescope live_grep <CR>", " live grep" },
["<leader>fm"] = { "<cmd> Telescope marks <CR>", " marks" },
}
}
return M