require("zen-mode").setup { -- your configuration comes here -- or leave it empty to use the default settings -- refer to the configuration section below } vim.keymap.set("n", "z", function() require("zen-mode").toggle({ window = { width = .85 -- width will be 85% of the editor width }, on_open = function(win) vim.wo.relativenumber = false end, -- callback where you can add custom code when the Zen window closes on_close = function() end, }) end)