nvim: Use snacks zen mode
Update to solely use snacks zen mode, removing both twilight and zen-mode plugins. For now, we switch to a personal fork of `snacks.nvim` which enables explicit enabling and disabling of the zen mode. If it gets upstreamed we can switch back to the regular snacks plugin. Streamlined some snacks loading and optional lazy-loading.
This commit is contained in:
parent
04fc9b8017
commit
dc8030f905
4 changed files with 24 additions and 34 deletions
|
|
@ -89,12 +89,12 @@
|
||||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "1ab18259472d9fe5756750fec722c31bab1712da" },
|
"rainbow-delimiters.nvim": { "branch": "master", "commit": "1ab18259472d9fe5756750fec722c31bab1712da" },
|
||||||
"render-markdown.nvim": { "branch": "main", "commit": "6d03af10063d5a2fadec3559de5dfa68da7d00ef" },
|
"render-markdown.nvim": { "branch": "main", "commit": "6d03af10063d5a2fadec3559de5dfa68da7d00ef" },
|
||||||
"smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" },
|
"smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" },
|
||||||
|
"snacks": { "branch": "feat/zen-explicit-enable-disable", "commit": "24459ae8a2a2fed8b7576fc16919439d1f697e29" },
|
||||||
"stay-centered.nvim": { "branch": "main", "commit": "e1a63ccaf2584e97c0ef8e64f9654c9a80d983f6" },
|
"stay-centered.nvim": { "branch": "main", "commit": "e1a63ccaf2584e97c0ef8e64f9654c9a80d983f6" },
|
||||||
"stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" },
|
"stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" },
|
||||||
"texpresso.vim": { "branch": "main", "commit": "907838c08bbf99ad6bed3c908f1d0551a92ab4e0" },
|
"texpresso.vim": { "branch": "main", "commit": "907838c08bbf99ad6bed3c908f1d0551a92ab4e0" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "748ca2789044607f19786b1d837044544c55e80a" },
|
"trouble.nvim": { "branch": "main", "commit": "748ca2789044607f19786b1d837044544c55e80a" },
|
||||||
"twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" },
|
|
||||||
"typst-preview.nvim": { "branch": "master", "commit": "dea4525d5420b7c32eebda7de15a6beb9d6574fa" },
|
"typst-preview.nvim": { "branch": "master", "commit": "dea4525d5420b7c32eebda7de15a6beb9d6574fa" },
|
||||||
"undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" },
|
"undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" },
|
||||||
"vifm.vim": { "branch": "master", "commit": "617e3dc7c9af1f03cc664124aff2fe98fafcf1b2" },
|
"vifm.vim": { "branch": "master", "commit": "617e3dc7c9af1f03cc664124aff2fe98fafcf1b2" },
|
||||||
|
|
@ -103,6 +103,5 @@
|
||||||
"wezterm.nvim": { "branch": "main", "commit": "f73bba23ab4becd146fa2d0a3a16a84b987eeaca" },
|
"wezterm.nvim": { "branch": "main", "commit": "f73bba23ab4becd146fa2d0a3a16a84b987eeaca" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" },
|
"which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" },
|
||||||
"wrapping.nvim": { "branch": "master", "commit": "bbf1b6e4d6a94f1c362125dc927284086e9fad7d" },
|
"wrapping.nvim": { "branch": "master", "commit": "bbf1b6e4d6a94f1c362125dc927284086e9fad7d" },
|
||||||
"zen-mode.nvim": { "branch": "main", "commit": "04b52674b8c800f8b7d4609e8bd8d0212e3ffa79" },
|
|
||||||
"zk-nvim": { "branch": "main", "commit": "fd1ab2239ed85ca51051c094a49a280f4ed76bb2" }
|
"zk-nvim": { "branch": "main", "commit": "fd1ab2239ed85ca51051c094a49a280f4ed76bb2" }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -381,7 +381,14 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ "folke/snacks.nvim", lazy = false, opts = {} },
|
{
|
||||||
|
"marty-oehme/snacks.nvim",
|
||||||
|
name = "snacks",
|
||||||
|
branch = "feat/zen-explicit-enable-disable",
|
||||||
|
version = false,
|
||||||
|
lazy = false,
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..
|
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..
|
||||||
{ "stevearc/stickybuf.nvim", config = true },
|
{ "stevearc/stickybuf.nvim", config = true },
|
||||||
-- make it a little less painful to open really big (>2mb) files by disabling features
|
-- make it a little less painful to open really big (>2mb) files by disabling features
|
||||||
|
|
|
||||||
|
|
@ -54,11 +54,18 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
-- image display
|
-- image display
|
||||||
|
{
|
||||||
|
"snacks",
|
||||||
|
optional = true,
|
||||||
|
cond = vim.fn.executable("magick") == 1, -- if not available fall back to image.nvim
|
||||||
|
opts = { image = { enabled = true } },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
-- "3rd/image.nvim", -- using Fork until https://github.com/3rd/image.nvim/pull/280 is merged
|
-- "3rd/image.nvim", -- using Fork until https://github.com/3rd/image.nvim/pull/280 is merged
|
||||||
"UnaTried/image.nvim",
|
"UnaTried/image.nvim",
|
||||||
name = "image.nvim",
|
name = "image.nvim",
|
||||||
version = false,
|
version = false,
|
||||||
|
cond = vim.fn.executable("magick") == 0, -- prefer snacks.nvim/image if magick available
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "leafo/magick" }, -- luarock, ensure global luarock51 dependency
|
{ "leafo/magick" }, -- luarock, ensure global luarock51 dependency
|
||||||
{ "nvim-treesitter/nvim-treesitter", optional = true },
|
{ "nvim-treesitter/nvim-treesitter", optional = true },
|
||||||
|
|
@ -112,7 +119,7 @@ return {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "willothy/wezterm.nvim", config = true },
|
{ "willothy/wezterm.nvim", config = true },
|
||||||
{
|
{
|
||||||
"folke/snacks.nvim",
|
"snacks",
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = { image = { enabled = true } },
|
opts = { image = { enabled = true } },
|
||||||
cond = vim.fn.executable("magick") == 1, -- only runs if ImageMagick installed
|
cond = vim.fn.executable("magick") == 1, -- only runs if ImageMagick installed
|
||||||
|
|
|
||||||
|
|
@ -44,21 +44,17 @@ local prose_plugs = {
|
||||||
-- UI improvements
|
-- UI improvements
|
||||||
-- provide distraction free writing
|
-- provide distraction free writing
|
||||||
{
|
{
|
||||||
"folke/zen-mode.nvim",
|
"snacks",
|
||||||
config = true,
|
opts = {
|
||||||
cmd = { "ZenMode" },
|
zen = {},
|
||||||
dependencies = {
|
styles = { zen = { backdrop = { transparent = false }, minimal = true } },
|
||||||
{ "folke/snacks.nvim", optional = true, opts = { dim = { enabled = true } } },
|
|
||||||
{ "arnamak/stay-centered.nvim", opts = { enabled = false } },
|
|
||||||
},
|
},
|
||||||
|
dependencies = { { "arnamak/stay-centered.nvim", opts = { enabled = false } } },
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"[sz",
|
"[sz",
|
||||||
function()
|
function()
|
||||||
require("zen-mode").close()
|
Snacks.zen.disable()
|
||||||
if require("core.util").is_available("snacks") then
|
|
||||||
Snacks.dim.disable()
|
|
||||||
end
|
|
||||||
require("stay-centered").disable()
|
require("stay-centered").disable()
|
||||||
end,
|
end,
|
||||||
silent = true,
|
silent = true,
|
||||||
|
|
@ -67,31 +63,12 @@ local prose_plugs = {
|
||||||
{
|
{
|
||||||
"]sz",
|
"]sz",
|
||||||
function()
|
function()
|
||||||
require("zen-mode").open()
|
Snacks.zen.enable()
|
||||||
if require("core.util").is_available("snacks") then
|
|
||||||
Snacks.dim.enable()
|
|
||||||
end
|
|
||||||
require("stay-centered").enable()
|
require("stay-centered").enable()
|
||||||
end,
|
end,
|
||||||
silent = true,
|
silent = true,
|
||||||
desc = "start center zen mode",
|
desc = "start center zen mode",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"[sZ",
|
|
||||||
function()
|
|
||||||
require("zen-mode").close()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
desc = "stop zen mode",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"]sZ",
|
|
||||||
function()
|
|
||||||
require("zen-mode").open()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
desc = "start zen mode",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue