diff --git a/neovim/lua/plugins.lua b/neovim/lua/plugins.lua index 104a913..9d9595c 100644 --- a/neovim/lua/plugins.lua +++ b/neovim/lua/plugins.lua @@ -182,6 +182,12 @@ return require('packer').startup(function(use) "preservim/vim-textobj-sentence", requires = "kana/vim-textobj-user", } + use { + "junegunn/goyo.vim", + cmd = { "Goyo", "Zen" }, + config = [[require("plugins.goyo-limelight")]], + requires = { "junegunn/limelight.vim", cmd = "Limelight" }, + } -- Treesitter use { diff --git a/neovim/lua/plugins/goyo-limelight.lua b/neovim/lua/plugins/goyo-limelight.lua new file mode 100644 index 0000000..f238b97 --- /dev/null +++ b/neovim/lua/plugins/goyo-limelight.lua @@ -0,0 +1,18 @@ +vim.g.goyo_width = 120 + +vim.cmd [[ +command Zen :Goyo + +function! s:goyo_enter() + Limelight +endfunction + +function! s:goyo_leave() + Limelight! +endfunction + +augroup zenevents + autocmd! User GoyoEnter nested call goyo_enter() + autocmd! User GoyoLeave nested call goyo_leave() +augroup end +]]