Squashed 'users/daniel/configs/system/nvim/nvim/' content from commit e088bce

git-subtree-dir: users/daniel/configs/system/nvim/nvim
git-subtree-split: e088bce2bd90c0b5c35d13a8615a55455b96294d
This commit is contained in:
2023-06-23 13:09:37 +01:00
commit 88674ae2b2
96 changed files with 7965 additions and 0 deletions

38
lua/user/mappings.lua Normal file
View File

@@ -0,0 +1,38 @@
-- 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.)
local time_format = '%Y-%m-%d %a %H:%M'
return {
-- 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("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>b"] = { name = "Buffers" },
-- Insert current time
["<F3>"] = { 'i<C-R>=strftime("' .. time_format .. '")<CR><Esc>' }
},
t = {
-- setting a mapping to false will disable it
-- ["<esc>"] = false,
},
i = {
["<F3>"] = { '<C-R>=strftime("' .. time_format .. '")<CR><Esc>' }
},
}