This is my own version of zenmode, highly inspired by nvim-tree.
zenmode_v31.mov
Just use your plugin manager, I prefer lazy:
require("lazy").setup({
"Snikimonkd/yazmp",
)}
Now you need to set up a keymap, or use it as a command (you can specify a width, default = 30):
vim.keymap.set("n", "<leader>zm", ":Zenmode<CR>")
-- or with width
vim.keymap.set("n", "<leader>zm", ":Zenmode 20<CR>")
To lazy load and set-up keybinds via lazy
require("lazy").setup({
{
"Snikimonkd/yazmp",
-- event = "VeryLazy", -- to load after loading the nvim UI
keys = { -- to load the plugin only when the keybinding is pressed
{"<leader>zm", "<cmd>Zenmode 30<CR>", desc="Toggle ZenMode"}
}
},
)}