From ef1029c595ef8f05fde53b925d24b5b0ffd3b712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hend=C3=A9n?= Date: Fri, 6 Dec 2024 14:14:11 -0400 Subject: [PATCH] add folke/snacks plugin add keybinding ctrl-w d to close buffer without closing window --- init.lua | 19 +++++++++++++++++++ lua/core/keymaps.lua | 1 + 2 files changed, 20 insertions(+) diff --git a/init.lua b/init.lua index c0e7ae41..d75fed0e 100644 --- a/init.lua +++ b/init.lua @@ -120,6 +120,25 @@ require('lazy').setup({ -- Use `opts = {}` to force a plugin to be loaded. -- + { + 'folke/snacks.nvim', + priority = 1000, + lazy = false, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + bigfile = { enabled = true }, + dashboard = { enabled = true }, + notifier = { + enabled = true, + timeout = 3000, + }, + quickfile = { enabled = true }, + statuscolumn = { enabled = true }, + words = { enabled = true }, + }, + }, -- Here is a more advanced example where we pass configuration -- options to `gitsigns.nvim`. This is equivalent to the following Lua: -- require('gitsigns').setup({ ... }) diff --git a/lua/core/keymaps.lua b/lua/core/keymaps.lua index 6b13128a..80e8229e 100644 --- a/lua/core/keymaps.lua +++ b/lua/core/keymaps.lua @@ -37,6 +37,7 @@ return { map('n', '', ':bp!', { desc = 'Go to previous buffer' }), map('n', 'bd', ':bd', { desc = 'close the current buffer' }), map('n', 'bl', ':FlyBuf', { desc = 'open up a list of all buffers in a float' }), + map('n', 'd', ':bpspbnbd', { desc = 'close the current buffer' }), -- neo-tree vim.keymap.set('n', 'e', ':Neotree reveal', { desc = 'Open file browser' }),