diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-04-24 11:09:38 +0300 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-04-24 11:09:38 +0300 |
| commit | 007f71ce692f32b7b57a048bf55348aca3c9933d (patch) | |
| tree | 923aa63c05a1bedee53140f0f59eaf5d54c49605 /.config/nvim/lua/custom/plugins | |
| parent | 996a61f2ddcf137bf2ed2ff62de6472417501cf9 (diff) | |
Replaced nvim-notify with snacks notifier and downloaded some more
programs for pdf/latex image support for snacks
Diffstat (limited to '.config/nvim/lua/custom/plugins')
| -rw-r--r-- | .config/nvim/lua/custom/plugins/lazydev.lua | 5 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/nvim-notify.lua | 34 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/snacks.lua | 37 |
3 files changed, 35 insertions, 41 deletions
diff --git a/.config/nvim/lua/custom/plugins/lazydev.lua b/.config/nvim/lua/custom/plugins/lazydev.lua index 35963b3..59d2366 100644 --- a/.config/nvim/lua/custom/plugins/lazydev.lua +++ b/.config/nvim/lua/custom/plugins/lazydev.lua @@ -1,9 +1,12 @@ return { 'folke/lazydev.nvim', ft = 'lua', + cmd = 'LazyDev', opts = { library = { - { path = 'luvit-meta/library', words = { 'vim%.uv' } }, + { path = '${3rd}/luv/library', words = { 'vim%.uv' } }, + { path = 'snacks.nvim', words = { 'Snacks' } }, + { path = 'lazy.nvim', words = { 'LazyVim' } }, }, }, } diff --git a/.config/nvim/lua/custom/plugins/nvim-notify.lua b/.config/nvim/lua/custom/plugins/nvim-notify.lua deleted file mode 100644 index 34942ca..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-notify.lua +++ /dev/null @@ -1,34 +0,0 @@ -return { - 'rcarriga/nvim-notify', - event = 'VeryLazy', - keys = { - { - '<leader>nd', - function() - require('notify').dismiss({ silent = true, pending = true }) - end, - desc = '[N]otify [D]ismiss All', - }, - }, - opts = function() - -- Filter messages - local filtered_messages = { 'No information available', 'No code actions available' } - ---@diagnostic disable-next-line: duplicate-set-field - vim.notify = function(message, level, opts) - opts = opts or {} - for _, msg in ipairs(filtered_messages) do - if message == msg then - return - end - end - return require('notify')(message, level, opts) - end - return { - background_colour = '#000000', - fps = 60, - render = 'default', - timeout = 500, - topDown = true, - } - end, -} diff --git a/.config/nvim/lua/custom/plugins/snacks.lua b/.config/nvim/lua/custom/plugins/snacks.lua index c5bda80..50f4ff2 100644 --- a/.config/nvim/lua/custom/plugins/snacks.lua +++ b/.config/nvim/lua/custom/plugins/snacks.lua @@ -1,20 +1,45 @@ return { 'folke/snacks.nvim', + priority = 1000, + lazy = false, ---@type snacks.Config opts = { - image = { - -- your image configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below + 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 = { { '<leader>si', function() - require('snacks').image.hover() + Snacks.image.hover() + end, + }, + { + '<leader>nd', + function() + Snacks.notifier.hide() end, + desc = '[N]otifications [D]ismiss All', + }, + { + '<leader>nh', + function() + Snacks.notifier.show_history() + end, + desc = '[N]otifications [D]ismiss All', }, }, - lazy = false, } |
