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"), group = augroup("close_with_q"),
pattern = { pattern = {
"PlenaryTestPopup", "PlenaryTestPopup",
"checkhealth",
"dbout",
"gitsigns-blame",
"grug-far", "grug-far",
"help", "help",
"lspinfo", "lspinfo",
"neotest-output",
"neotest-output-panel",
"neotest-summary",
"notify", "notify",
"snacks_win",
"qf", "qf",
"snacks_win",
"snacks_notif",
"spectre_panel", "spectre_panel",
"startuptime", "startuptime",
"tsplayground", "tsplayground",
"neotest-output",
"checkhealth",
"neotest-summary",
"neotest-output-panel",
"dbout",
"gitsigns-blame",
}, },
callback = function(event) callback = function(event)
vim.bo[event.buf].buflisted = false vim.bo[event.buf].buflisted = false

View file

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

View file

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

View file

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