From 74636d1caba12d0c2e999b7532f621ca84410133 Mon Sep 17 00:00:00 2001 From: voidarclabs Date: Wed, 14 May 2025 20:14:22 +0100 Subject: [PATCH] changed keybinds or something oo description leap was intelligent and doesnt overwrite user defined keybinds --- init.lua | 2 ++ lua/plugins/lightspeed.lua | 3 --- lua/plugins/mini.lua | 8 -------- lua/plugins/snacks.lua | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index f2e4122..d9a7b10 100644 --- a/init.lua +++ b/init.lua @@ -26,3 +26,5 @@ vim.keymap.set("n", "", "FloatermNew lazygit") vim.keymap.set("n", "", "FloatermKill") vim.lsp.set_log_level("debug") + +require("leap").set_default_mappings() diff --git a/lua/plugins/lightspeed.lua b/lua/plugins/lightspeed.lua index d341f9c..b1bac3c 100644 --- a/lua/plugins/lightspeed.lua +++ b/lua/plugins/lightspeed.lua @@ -1,6 +1,3 @@ return { "ggandor/leap.nvim", - config = function() - require("leap").set_default_mappings() - end, } diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua index 7ead11b..b1ee399 100644 --- a/lua/plugins/mini.lua +++ b/lua/plugins/mini.lua @@ -13,13 +13,5 @@ return { }, }) require("mini.notify").setup() - require("mini.surround").setup({ - mappings = { - add = "gsa", -- Add surrounding - delete = "gsd", -- Delete surrounding - find = "gsf", -- Find surrounding - replace = "gsr", -- Replace surrounding - }, - }) end, } diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index c72c0e6..1cd4304 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -5,10 +5,42 @@ return { ---@type snacks.Config opts = { bigfile = { enabled = true }, + dashboard = { enabled = true, width = 100, preset = { + keys = { + { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" }, + { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" }, + { + icon = " ", + key = "g", + desc = "Find Text", + action = ":lua Snacks.dashboard.pick('live_grep')", + }, + { + icon = " ", + key = "r", + desc = "Recent Files", + action = ":lua Snacks.dashboard.pick('oldfiles')", + }, + { + icon = " ", + key = "c", + desc = "Config", + action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})", + }, + { icon = " ", key = "U", desc = "Restore Session", section = "session" }, + { + icon = "󰒲 ", + key = "L", + desc = "Lazy", + action = ":Lazy", + enabled = package.loaded.lazy ~= nil, + }, + { icon = " ", key = "q", desc = "Quit", action = ":qa" }, + }, header = [[ ░ ░░░░ ░░░ ░░░ ░░ ░░░░ ░░░ ░░░░ ░░ ▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒