From 34d996020d70035cd84cd359ab06a19f91e3fb1c Mon Sep 17 00:00:00 2001 From: Michaƫl Ball Date: Tue, 30 Jul 2024 07:28:00 +0100 Subject: Config updates --- neovim/.config/nvim/lua/plugins/goyo.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'neovim/.config/nvim/lua/plugins/goyo.lua') diff --git a/neovim/.config/nvim/lua/plugins/goyo.lua b/neovim/.config/nvim/lua/plugins/goyo.lua index 7de7150..dba0f39 100644 --- a/neovim/.config/nvim/lua/plugins/goyo.lua +++ b/neovim/.config/nvim/lua/plugins/goyo.lua @@ -1,7 +1,7 @@ return { { 'junegunn/goyo.vim', - cond = function() return vim.fn.exists('g:gui_vimr') == 1 end, + cond = function() return vim.fn.has('gui_running') == 1 end, dependencies = { { 'junegunn/limelight.vim', @@ -15,14 +15,31 @@ return { vim.opt.showmode = false vim.opt.showcmd = false vim.opt.scrolloff = 999 + + vim.opt.laststatus = 0 + local gl = require('galaxyline') + local gls = gl.section + gls.left = {} + gls.mid = {} + gls.right = {} + vim.cmd('Limelight') + vim.cmd('VimRToggleFullscreen') end local goyo_leave = function() + local function script_path() + local str = debug.getinfo(2, 'S').source:sub(2) + return str:match('(.*/)') or './' + end + vim.opt.showmode = true vim.opt.showcmd = true vim.opt.scrolloff = 5 + dofile(script_path() .. '../config/galaxyline.lua') + vim.opt.laststatus = 2 vim.cmd('Limelight!') + vim.cmd('VimRToggleFullscreen') end local goyo_augroup = vim.api.nvim_create_augroup('Goyo', { clear = true }) -- cgit v1.2.3