From c80a54e42b52ce297f0f2f71af23c562832025c7 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:35:27 +0900 Subject: init --- .../TheSiahxyz/lua/thesiahxyz/plugins/zenmode.lua | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/zenmode.lua (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/zenmode.lua') diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/zenmode.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/zenmode.lua new file mode 100644 index 0000000..beb48f5 --- /dev/null +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/zenmode.lua @@ -0,0 +1,46 @@ +return { + "folke/zen-mode.nvim", + opts = {}, + config = function() + vim.keymap.set("n", "zz", function() + require("zen-mode").toggle({ + -- callback where you can add custom code when the Zen window opens + on_open = function() + vim.wo.wrap = true + vim.wo.number = true + vim.wo.rnu = true + end, + -- callback where you can add custom code when the Zen window closes + on_close = function() + vim.wo.wrap = false + vim.wo.number = true + vim.wo.rnu = true + ColorMyPencils() + end, + }) + end, { desc = "Toggle zenmode" }) + + vim.keymap.set("n", "zZ", function() + require("zen-mode").toggle({ + window = { + width = 90, + }, + -- callback where you can add custom code when the Zen window opens + on_open = function() + vim.wo.wrap = true + vim.wo.number = false + vim.wo.rnu = false + vim.opt.colorcolumn = "0" + ColorMyPencils("seoul256") + end, + -- callback where you can add custom code when the Zen window closes + on_close = function() + vim.wo.wrap = false + vim.wo.number = true + vim.wo.rnu = true + ColorMyPencils() + end, + }) + end, { desc = "Toggle zenmode (custom)" }) + end, +} -- cgit v1.2.3