diff --git a/nvim/init.lua b/nvim/init.lua index 9c76349..dd8e7a5 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -12,3 +12,4 @@ require('autocompletion') require('treesitterconfig') require('filemanager') require('notes') +require('zenmode') diff --git a/nvim/lua/pluginoptions.lua b/nvim/lua/pluginoptions.lua index 04c061e..1e7c6ca 100644 --- a/nvim/lua/pluginoptions.lua +++ b/nvim/lua/pluginoptions.lua @@ -42,27 +42,6 @@ vim.api.nvim_set_var('vimtex_compiler_latexmk', { -- ========================= vim.api.nvim_set_var('tmuxcomplete#trigger', '') - --- GOYO --- ========================= - -vim.cmd [[ -function! s:goyo_enter() - set noshowcmd - set scrolloff=999 -endfunction - -function! s:goyo_leave() - set showcmd - set scrolloff=1 -endfunction - -autocmd! User GoyoEnter nested call goyo_enter() -autocmd! User GoyoLeave nested call goyo_leave() -]] - -vim.api.nvim_set_var('goyo_width', 120) - -- COLORS.LUA SETUP -- ========================= require('colorizer').setup() diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index c1d47bb..c2e6131 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -25,8 +25,8 @@ Plug 'christoomey/vim-tmux-navigator' -- winresizer Plug 'simeji/winresizer' --- goyo -Plug 'junegunn/goyo.vim' +-- vim zenmode +Plug 'folke/zen-mode.nvim' -- FILE MANAGEMENT -- =================== diff --git a/nvim/lua/zenmode.lua b/nvim/lua/zenmode.lua new file mode 100644 index 0000000..9e52976 --- /dev/null +++ b/nvim/lua/zenmode.lua @@ -0,0 +1,38 @@ +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 = true, -- disable number column + relativenumber = true, -- 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 = true, -- disables the command in the last line of the screen + }, + gitsigns = { enabled = true }, -- disables git signs + }, + -- 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, +}