Code cleanup

This commit is contained in:
Christoffer Martinsson 2023-05-28 05:51:30 +02:00
parent 779f17b04d
commit 461eab7d23

View File

@ -3,6 +3,7 @@
-- Please use this mappings table to set keyboard mapping since this is the -- Please use this mappings table to set keyboard mapping since this is the
-- lower level configuration and more robust one. (which-key will -- lower level configuration and more robust one. (which-key will
-- automatically pick-up stored data by this setting.) -- automatically pick-up stored data by this setting.)
return { return {
-- first key is the mode -- first key is the mode
n = { n = {
@ -11,9 +12,7 @@ return {
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" }, ["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
["<leader>bD"] = { ["<leader>bD"] = {
function() function()
require("astronvim.utils.status").heirline.buffer_picker( require("astronvim.utils.status").heirline.buffer_picker(function(bufnr) require("astronvim.utils.buffer").close(bufnr) end)
function(bufnr) require("astronvim.utils.buffer").close(bufnr) end
)
end, end,
desc = "Pick to close", desc = "Pick to close",
}, },
@ -22,6 +21,8 @@ return {
["<leader>b"] = { name = "Buffers" }, ["<leader>b"] = { name = "Buffers" },
-- quick save -- quick save
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command -- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
["<leader><space>"] = { ":Telescope find_files search_dirs=~/<cr>", desc = "Open file" },
["<leader><C-space>"] = { ":Telescope find_files search_dirs=~/ hidden=true<cr>", desc = "Open file inc. hidden files" },
}, },
t = { t = {
-- setting a mapping to false will disable it -- setting a mapping to false will disable it