Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit 0114098

Browse files
mapping: clean up configuration file
1 parent 7a08c2b commit 0114098

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

mappings.lua

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
-- Mapping data with "desc" stored directly by vim.keymap.set().
2+
-- Register which-key menu name with `name` and without command
23
--
3-
-- Please use this mappings table to set keyboard mapping since this is the
4-
-- lower level configuration and more robust one. (which-key will
5-
-- automatically pick-up stored data by this setting.)
4+
-- This mappings table is the lower level configuration and more robust approach
5+
-- which-key will automatically pick-up stored data by this setting
66

77
-- Icons can be copied from https://www.nerdfonts.com/cheat-sheet
88

@@ -13,25 +13,26 @@ return {
1313
["<leader><tab>"] = { "<cmd>b#<cr>", desc = "Last tab" },
1414

1515
-- mappings seen under group name "Buffer"
16+
["<leader>b"] = { name = "Buffers" },
1617
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
18+
-- ["<leader>bD"] = { "<cmd>Bdelete<cr>", desc = "Delete buffer" },
1719
["<leader>bD"] = {
1820
function()
19-
require("astronvim.utils.status").heirline.buffer_picker(function(bufnr)
20-
require("astronvim.utils.buffer").close(bufnr)
21-
end)
21+
require("astronvim.utils.status").heirline.buffer_picker( function(bufnr)
22+
require("astronvim.utils.buffer").close(bufnr) end
23+
)
2224
end,
2325
desc = "Pick to close",
2426
},
25-
-- tables with the `name` key will be registered with which-key if it's installed
2627
-- this is useful for naming menus
27-
["<leader>b"] = { name = "Buffers" },
28+
["<leader>j"] = { name = "Jump" },
2829

2930
-- Editing
3031
["zZ"] = { "<cmd>ZenMode<cr>", desc = " Zen mode" },
3132

3233
-- Git Menu
3334
-- Menu mappings
34-
["<leader>gh"] = false, -- disable Reset Git Hunk mapping
35+
["<leader>gh"] = false, -- disable Reset Git Hunk mapping, used for Octo
3536
["<leader>gn"] = { name = " Neogit" }, -- Neogit menu
3637
-- quick save
3738
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command

0 commit comments

Comments
 (0)