mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-02-10 06:50:03 +01:00
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.
This commit is contained in:
parent
5352c9a613
commit
dc677d170c
@ -145,6 +145,7 @@ in
|
|||||||
nnoremap <silent> <leader>j :Buffers<CR>
|
nnoremap <silent> <leader>j :Buffers<CR>
|
||||||
nnoremap <silent> <leader>l :Rg<CR>
|
nnoremap <silent> <leader>l :Rg<CR>
|
||||||
nnoremap <silent> <leader>; :NvimTreeToggle<CR>
|
nnoremap <silent> <leader>; :NvimTreeToggle<CR>
|
||||||
|
nnoremap <silent> <leader>z :ZenMode<CR>
|
||||||
vnoremap <C-s> y:silent !notify-send -t 4000 "成果" "$(tango '<C-r>0')"<CR>:<Esc>
|
vnoremap <C-s> y:silent !notify-send -t 4000 "成果" "$(tango '<C-r>0')"<CR>:<Esc>
|
||||||
|
|
||||||
autocmd BufNewFile,BufRead *.ecr setlocal syntax=html
|
autocmd BufNewFile,BufRead *.ecr setlocal syntax=html
|
||||||
@ -270,6 +271,31 @@ in
|
|||||||
type = "lua";
|
type = "lua";
|
||||||
config = ''require('Comment').setup()'';
|
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;
|
plugin = plenary-nvim;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
|
Loading…
Reference in New Issue
Block a user