fix(snacks): added snack_notif filetype to be excluded in some things

This commit is contained in:
Folke Lemaitre 2024-11-07 00:16:48 +01:00
parent ecfbf5b7f7
commit 93a5323ba6
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 21 additions and 18 deletions

View file

@ -55,21 +55,22 @@ vim.api.nvim_create_autocmd("FileType", {
group = augroup("close_with_q"),
pattern = {
"PlenaryTestPopup",
"checkhealth",
"dbout",
"gitsigns-blame",
"grug-far",
"help",
"lspinfo",
"neotest-output",
"neotest-output-panel",
"neotest-summary",
"notify",
"snacks_win",
"qf",
"snacks_win",
"snacks_notif",
"spectre_panel",
"startuptime",
"tsplayground",
"neotest-output",
"checkhealth",
"neotest-summary",
"neotest-output-panel",
"dbout",
"gitsigns-blame",
},
callback = function(event)
vim.bo[event.buf].buflisted = false

View file

@ -14,18 +14,19 @@ return {
init = function()
vim.api.nvim_create_autocmd("FileType", {
pattern = {
"Trouble",
"alpha",
"dashboard",
"fzf",
"help",
"lazy",
"snacks_terminal",
"snacks_win",
"mason",
"neo-tree",
"notify",
"snacks_notif",
"snacks_terminal",
"snacks_win",
"toggleterm",
"Trouble",
"trouble",
},
callback = function()

View file

@ -209,18 +209,19 @@ return {
scope = { show_start = false, show_end = false },
exclude = {
filetypes = {
"help",
"Trouble",
"alpha",
"dashboard",
"neo-tree",
"Trouble",
"trouble",
"help",
"lazy",
"mason",
"neo-tree",
"notify",
"toggleterm",
"snacks_win",
"snacks_notif",
"snacks_terminal",
"snacks_win",
"toggleterm",
"trouble",
},
},
}

View file

@ -1,5 +1,5 @@
---@class lazyvim.util.terminal
---@overload fun(cmd: string|string[], opts: snacks.terminal.Config): snacks.terminal
---@overload fun(cmd: string|string[], opts: snacks.terminal.Opts): snacks.terminal
local M = setmetatable({}, {
__call = function(m, ...)
return m.open(...)
@ -40,7 +40,7 @@ end
-- Opens a floating terminal (interactive by default)
---@deprecated use Snacks.terminal instead
---@param cmd? string[]|string
---@param opts? snacks.terminal.Config
---@param opts? snacks.terminal.Opts
function M.open(cmd, opts)
return Snacks.terminal(cmd, opts)
end