From 6bef8f32b19778fdfe52f0eb39719425508dcc7b Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Thu, 24 Apr 2025 11:36:39 +0300 Subject: Refactored nvim config to make it easier and less insanely nested --- .config/nvim/lua/plugins/snacks.lua | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .config/nvim/lua/plugins/snacks.lua (limited to '.config/nvim/lua/plugins/snacks.lua') diff --git a/.config/nvim/lua/plugins/snacks.lua b/.config/nvim/lua/plugins/snacks.lua new file mode 100644 index 0000000..50f4ff2 --- /dev/null +++ b/.config/nvim/lua/plugins/snacks.lua @@ -0,0 +1,45 @@ +return { + 'folke/snacks.nvim', + priority = 1000, + lazy = false, + ---@type snacks.Config + opts = { + image = {}, + ---@class snacks.notifier.Config + notifier = { + ---@type snacks.notifier.style + style = 'compact', + filter = function(notif) + local filtered_messages = { 'No information available', 'No code actions available' } + for _, msg in ipairs(filtered_messages) do + if notif.msg == msg then + return false + end + end + return true + end, + }, + }, + keys = { + { + 'si', + function() + Snacks.image.hover() + end, + }, + { + 'nd', + function() + Snacks.notifier.hide() + end, + desc = '[N]otifications [D]ismiss All', + }, + { + 'nh', + function() + Snacks.notifier.show_history() + end, + desc = '[N]otifications [D]ismiss All', + }, + }, +} -- cgit v1.3.1