mirror of
https://github.com/dwinkler1/np.git
synced 2026-02-19 22:40:57 -05:00
Add inline comments and extract Lua config for better clarity
Co-authored-by: dwinkler1 <22460147+dwinkler1@users.noreply.github.com>
This commit is contained in:
parent
eaecb56186
commit
496c238a12
3 changed files with 183 additions and 14 deletions
16
templates/rde/lib/mini-notify-config.lua
Normal file
16
templates/rde/lib/mini-notify-config.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
-- Configuration for mini.notify
|
||||
-- Filters out some verbose LSP progress notifications
|
||||
local predicate = function(notif)
|
||||
if not (notif.data.source == "lsp_progress" and notif.data.client_name == "lua_ls") then
|
||||
return true
|
||||
end
|
||||
-- Filter out some LSP progress notifications from 'lua_ls'
|
||||
return notif.msg:find("Diagnosing") == nil and notif.msg:find("semantic tokens") == nil
|
||||
end
|
||||
|
||||
local custom_sort = function(notif_arr)
|
||||
return MiniNotify.default_sort(vim.tbl_filter(predicate, notif_arr))
|
||||
end
|
||||
|
||||
require("mini.notify").setup({ content = { sort = custom_sort } })
|
||||
vim.notify = MiniNotify.make_notify()
|
||||
Loading…
Add table
Add a link
Reference in a new issue