nvim: configure zenmode
This commit is contained in:
parent
61fee7bacd
commit
696bda73c7
2 changed files with 49 additions and 2 deletions
|
@ -169,6 +169,54 @@ M.neoscroll = function()
|
||||||
end
|
end
|
||||||
-- <<<
|
-- <<<
|
||||||
|
|
||||||
|
-- ZenMode >>>
|
||||||
|
M.zenmode = function()
|
||||||
|
-- map :ZM to :ZenMode
|
||||||
|
vim.cmd 'command! ZM ZenMode'
|
||||||
|
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 = 0.95, -- 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 = { -- uncomment to do what the sign says
|
||||||
|
-- signcolumn = "no", -- signcolumn
|
||||||
|
number = false, -- number column
|
||||||
|
-- relativenumber = false, -- relative numbers
|
||||||
|
-- cursorline = false, -- cursorline
|
||||||
|
cursorcolumn = false, -- cursor column
|
||||||
|
-- foldcolumn = "0", -- fold column
|
||||||
|
-- list = false, -- 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 = true }, -- disables git signs
|
||||||
|
tmux = { enabled = false }, -- disables the tmux statusline
|
||||||
|
},
|
||||||
|
-- Functions I could write but I'm probably not going to use
|
||||||
|
-- -- 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,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
-- <<<
|
||||||
|
|
||||||
-- Autosession >>>
|
-- Autosession >>>
|
||||||
M.autosession = function()
|
M.autosession = function()
|
||||||
local opts = {
|
local opts = {
|
||||||
|
|
|
@ -206,8 +206,7 @@ return require('packer').startup({function()
|
||||||
use { -- Zen mode (:ZenMode or :ZM)
|
use { -- Zen mode (:ZenMode or :ZM)
|
||||||
"folke/zen-mode.nvim",
|
"folke/zen-mode.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd 'command! ZM ZenMode'
|
require('blake.other').zenmode()
|
||||||
require("zen-mode").setup()
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
use { -- dim text outside paragraph or function
|
use { -- dim text outside paragraph or function
|
||||||
|
|
Loading…
Add table
Reference in a new issue