From dc677d170cc3e09d014e05292881652570abcd48 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Mon, 10 Jul 2023 21:58:02 -0400 Subject: [PATCH] neovim: Add zen-mode-nvim zen-mode-nvim is a cool lua plugin similar to Goyo that makes reading and writing long-form content in neovim easier. --- home/neovim.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/home/neovim.nix b/home/neovim.nix index 90e13d09..42ca6c71 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -145,6 +145,7 @@ in nnoremap j :Buffers nnoremap l :Rg nnoremap ; :NvimTreeToggle + nnoremap z :ZenMode vnoremap y:silent !notify-send -t 4000 "成果" "$(tango '0')": autocmd BufNewFile,BufRead *.ecr setlocal syntax=html @@ -270,6 +271,31 @@ in type = "lua"; config = ''require('Comment').setup()''; } + { + plugin = zen-mode-nvim; + type = "lua"; + config = /* lua */ '' + require("zen-mode").setup({ + window = { + backdrop = 1, + width = 80, + height = 0.9, + options = { + signcolumn = "no", + number = false, + }, + }, + on_open = function(win) + vim.cmd("GitBlameDisable") + vim.cmd("ScrollbarHide") + end, + on_close = function() + vim.cmd("GitBlameEnable") + vim.cmd("ScrollbarShow") + end, + }) + ''; + } { plugin = plenary-nvim; type = "lua";