Browse Source

zen mode

imac
Juni Kim 2 years ago
parent
commit
3ffaf8ca15
  1. 19
      after/plugin/zenmode.lua
  2. 3
      lua/junikim/options.lua
  3. 8
      lua/junikim/packer.lua

19
after/plugin/zenmode.lua

@ -0,0 +1,19 @@
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", "<leader>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)

3
lua/junikim/options.lua

@ -13,6 +13,9 @@ vim.opt.colorcolumn = "80"
vim.opt.list = true vim.opt.list = true
vim.opt.wrap = false vim.opt.wrap = false
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true vim.opt.undofile = true
vim.opt.hlsearch = false vim.opt.hlsearch = false

8
lua/junikim/packer.lua

@ -59,4 +59,12 @@ return require('packer').startup(function(use)
} }
use 'ethanholz/nvim-lastplace' use 'ethanholz/nvim-lastplace'
-- zen mode
use {
"folke/zen-mode.nvim",
requires = {
{ 'folke/twilight.nvim' }
}
}
end) end)
Loading…
Cancel
Save