-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Improving notifications, fixing scrollback
- Loading branch information
1 parent
9c679c3
commit e70165e
Showing
4 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-- Overwrite the default notify method with the new one | ||
local betterNotify = require("notify") | ||
betterNotify.setup({ | ||
background_colour = "#000000", | ||
}) | ||
local ignoreMessages = { | ||
'[LSP] Format request failed, no matching language servers.', | ||
}; | ||
|
||
function Contains(list, x) | ||
for _, v in ipairs(list) do | ||
if v == x then | ||
return true | ||
end | ||
end | ||
return false | ||
end | ||
|
||
--- No idea why this is necessary? | ||
---@diagnostic disable-next-line: duplicate-set-field | ||
vim.notify = function(msg, level, opt) | ||
if Contains(ignoreMessages, msg) then | ||
return | ||
end | ||
|
||
return betterNotify(msg, level, opt) | ||
end |