refactor: clean up user example files to be easier to follow
This commit is contained in:
33
lua/plugins/mappings.lua
Normal file
33
lua/plugins/mappings.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
if true then return {} end -- REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||
|
||||
-- AstroCore provides a central place to modify mappings set up as well as which-key menu titles
|
||||
return {
|
||||
"AstroNvim/astrocore",
|
||||
opts = {
|
||||
mappings = {
|
||||
-- first key is the mode
|
||||
n = {
|
||||
-- second key is the lefthand side of the map
|
||||
-- mappings seen under group name "Buffer"
|
||||
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
|
||||
["<leader>bD"] = {
|
||||
function()
|
||||
require("astroui.status.heirline").buffer_picker(
|
||||
function(bufnr) require("astrocore.buffer").close(bufnr) end
|
||||
)
|
||||
end,
|
||||
desc = "Pick to close",
|
||||
},
|
||||
-- tables with just a `desc` key will be registered with which-key if it's installed
|
||||
-- this is useful for naming menus
|
||||
["<leader>b"] = { desc = "Buffers" },
|
||||
-- quick save
|
||||
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
||||
},
|
||||
t = {
|
||||
-- setting a mapping to false will disable it
|
||||
-- ["<esc>"] = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user