generated from AstroNvim/user_example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmappings.lua
41 lines (41 loc) · 1.34 KB
/
mappings.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
-- Mapping data with "desc" stored directly by vim.keymap.set().
--
-- Please use this mappings table to set keyboard mapping since this is the
-- lower level configuration and more robust one. (which-key will
-- automatically pick-up stored data by this setting.)
return {
-- first key is the mode
n = {
[":"] = { ":Telescope cmdline<CR>" },
["q"] = { "<Esc>" },
["x"] = { '"_x' },
-- second key is the lfthand side of the map
-- mappings seen under group name "Buffer"
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
["<leader>bD"] = {
function()
require("astronvim.utils.status").heirline.buffer_picker(
function(bufnr) require("astronvim.utils.buffer").close(bufnr) end
)
end,
desc = "Pick to close",
},
-- tables with the `name` key will be registered with which-key if it's installed
-- this is useful for naming menus
["<leader>xc"] = { "<cmd>ZenMode <CR>" },
["<leader>b"] = { name = "Buffers" },
["<C-a>"] = {
function() require("harpoon.mark").add_file() end,
},
["<C-e>"] = {
function() require("harpoon.ui").toggle_quick_menu() end,
},
["<leader>ee"] = {
function() require("dropbar.api").pick() end,
},
["<leader>fd"] = { "<cmd>Telescope dir live_grep<CR>" },
},
v = {
["x"] = { '"_x' },
},
}