refactor: clean up user example files to be easier to follow

This commit is contained in:
Micah Halter
2023-07-27 12:42:05 -04:00
parent b586a17c6b
commit e9875c83b6
15 changed files with 178 additions and 109 deletions

33
lua/plugins/mappings.lua Normal file
View 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,
},
},
},
}