add(nvim): zen-mode

This commit is contained in:
Léana 江 2023-05-02 21:30:15 +02:00 committed by Léana 江
parent d238bce407
commit cf098ba949
8 changed files with 92 additions and 23 deletions

View file

@ -0,0 +1,64 @@
require "zen-mode".setup {
window = {
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
-- height and width can be:
-- * an absolute number of cells when > 1
-- * a percentage of the width / height of the editor when <= 1
-- * a function that returns the width or the height
width = 120, -- width of the Zen window
height = 1, -- height of the Zen window
-- by default, no options are changed for the Zen window
-- uncomment any of the options below, or add other vim.wo options you want to apply
options = {
-- signcolumn = "no", -- disable signcolumn
-- number = false, -- disable number column
-- relativenumber = false, -- disable relative numbers
-- cursorline = false, -- disable cursorline
-- cursorcolumn = false, -- disable cursor column
-- foldcolumn = "0", -- disable fold column
-- list = false, -- disable whitespace characters
},
},
plugins = {
-- disable some global vim options (vim.o...)
-- comment the lines to not apply the options
options = {
enabled = true,
ruler = false, -- disables the ruler text in the cmd line area
showcmd = false, -- disables the command in the last line of the screen
},
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
gitsigns = { enabled = false }, -- disables git signs
tmux = { enabled = false }, -- disables the tmux statusline
-- this will change the font size on kitty when in zen mode
-- to make this work, you need to set the following kitty options:
-- - allow_remote_control socket-only
-- - listen_on unix:/tmp/kitty
kitty = {
enabled = false,
font = "+4", -- font size increment
},
-- this will change the font size on alacritty when in zen mode
-- requires Alacritty Version 0.10.0 or higher
-- uses `alacritty msg` subcommand to change font size
alacritty = {
enabled = false,
font = "14", -- font size
},
-- this will change the font size on wezterm when in zen mode
-- See alse also the Plugins/Wezterm section in this projects README
wezterm = {
enabled = false,
-- can be either an absolute font size or the number of incremental steps
font = "+4", -- (10% increase per step)
},
},
-- callback where you can add custom code when the Zen window opens
on_open = function(win)
end,
-- callback where you can add custom code when the Zen window closes
on_close = function()
end,
}
vim.keymap.set("n", "<leader>z", ":ZenMode<CR>", { desc = "enable Zen mode" })

View file

@ -41,6 +41,7 @@ require("lazy").setup({
{ "akinsho/toggleterm.nvim", version = "*" },
-- Can't live without
"folke/zen-mode.nvim",
"numToStr/Comment.nvim",
"tpope/vim-surround",
"lewis6991/gitsigns.nvim",

View file

@ -44,8 +44,8 @@
"undotree": { "branch": "master", "commit": "485f01efde4e22cb1ce547b9e8c9238f36566f21" },
"vim-be-good": { "branch": "master", "commit": "c290810728a4f75e334b07dc0f3a4cdea908d351" },
"vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" },
"vim-latex-live-preview": { "branch": "master", "commit": "e1a6a31b123bf6b15635cac6d391afcb2670187a" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-visual-multi": { "branch": "master", "commit": "724bd53adfbaf32e129b001658b45d4c5c29ca1a" }
"vim-visual-multi": { "branch": "master", "commit": "724bd53adfbaf32e129b001658b45d4c5c29ca1a" },
"zen-mode.nvim": { "branch": "main", "commit": "6e6c963d70a8e47854fa656987666bfb863f9c4e" }
}