Skip to content

Commit

Permalink
fix(nvim): fix zen-mode/twilight keymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
minusfive committed Nov 12, 2024
1 parent 8d51563 commit 6e371cb
Showing 1 changed file with 41 additions and 14 deletions.
55 changes: 41 additions & 14 deletions .config/nvim/lua/plugins/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,48 @@ return {
{
"folke/zen-mode.nvim",
event = "VeryLazy",
dependencies = { "folke/twilight.nvim", opts = { context = 15 } },
opts = {
backdrop = 0,
optionns = {
laststatus = 0,
},
plugins = {
twilight = { enabled = false },
wezterm = { enabled = true, font = "+2" },
},
},
keys = {
{ "<leader>zz", "<cmd>ZenMode<cr>", desc = "Zen Mode" },
{ "<leader>zt", "<cmd>Twilight<cr>", desc = "Twilight" },
dependencies = {
"folke/twilight.nvim",
opts = function(_, opts)
opts.context = 5

Snacks.toggle({
name = "Twilight",
get = function()
return require("twilight.view").enabled
end,
set = function()
require("twilight").toggle()
end,
}):map("<leader>ut")
end,
},
opts = function(_, opts)
opts.window = opts.window or {}
opts.window.backdrop = 1

opts.plugins = opts.plugins or {}

opts.plugins.options = opts.plugins.options or {}
opts.plugins.options.laststatus = 0

opts.plugins.twilight = opts.plugins.twilight or {}
opts.plugins.twilight.enabled = false

opts.plugins.wezterm = opts.plugins.wezterm or {}
opts.plugins.wezterm.enabled = true
opts.plugins.wezterm.font = "+2"

Snacks.toggle({
name = "Zen Mode",
get = function()
return require("zen-mode.view").is_open()
end,
set = function()
require("zen-mode").toggle()
end,
}):map("<leader>uz")
end,
},

-- Animation enhancements
Expand Down

0 comments on commit 6e371cb

Please sign in to comment.