Replaced nvim-notify with snacks notifier and downloaded some more
programs for pdf/latex image support for snacks
This commit is contained in:
@@ -6,8 +6,7 @@ function Notify(message, title, level)
|
||||
title = level
|
||||
end
|
||||
end
|
||||
local notify = require('notify')
|
||||
notify(message, level, { title = ' ' .. title })
|
||||
vim.notify(message, level, { title = ' ' .. title })
|
||||
end
|
||||
|
||||
function ToggleWrap()
|
||||
|
||||
@@ -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' } },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -97,6 +97,9 @@
|
||||
prismlauncher
|
||||
cloudflare-warp
|
||||
drawio
|
||||
tree-sitter
|
||||
tectonic
|
||||
mermaid-cli
|
||||
];
|
||||
|
||||
# For nixd LSP to recognize what nixpkgs version I use
|
||||
|
||||
Reference in New Issue
Block a user