nvim: Use snacks.nvim for zenmode and papis if available
Remove dependency on 'twilight.nvim' and make dependencies on 'snacks.nvim' optional, but load it in the base plugins.
This commit is contained in:
parent
63c4952118
commit
e63681c16b
2 changed files with 11 additions and 1 deletions
|
|
@ -381,6 +381,7 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
{ "folke/snacks.nvim", lazy = false, opts = {} },
|
||||
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..
|
||||
{ "stevearc/stickybuf.nvim", config = true },
|
||||
-- make it a little less painful to open really big (>2mb) files by disabling features
|
||||
|
|
|
|||
|
|
@ -47,12 +47,18 @@ local prose_plugs = {
|
|||
"folke/zen-mode.nvim",
|
||||
config = true,
|
||||
cmd = { "ZenMode" },
|
||||
dependencies = { "folke/twilight.nvim", { "arnamak/stay-centered.nvim", opts = { enabled = false } } },
|
||||
dependencies = {
|
||||
{ "folke/snacks.nvim", optional = true, opts = { dim = { enabled = true } } },
|
||||
{ "arnamak/stay-centered.nvim", opts = { enabled = false } },
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"[sz",
|
||||
function()
|
||||
require("zen-mode").close()
|
||||
if require("core.util").is_available("snacks") then
|
||||
Snacks.dim.disable()
|
||||
end
|
||||
require("stay-centered").disable()
|
||||
end,
|
||||
silent = true,
|
||||
|
|
@ -62,6 +68,9 @@ local prose_plugs = {
|
|||
"]sz",
|
||||
function()
|
||||
require("zen-mode").open()
|
||||
if require("core.util").is_available("snacks") then
|
||||
Snacks.dim.enable()
|
||||
end
|
||||
require("stay-centered").enable()
|
||||
end,
|
||||
silent = true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue