diff options
author | Michaël Ball <michael.ball@krotosaudio.com> | 2024-07-30 07:28:00 +0100 |
---|---|---|
committer | Michaël Ball <michael.ball@krotosaudio.com> | 2024-07-30 07:28:00 +0100 |
commit | 34d996020d70035cd84cd359ab06a19f91e3fb1c (patch) | |
tree | 480f9b336d85dd93617d8eac718ae189188442ef /neovim/.config/nvim/lua/plugins/goyo.lua | |
parent | 0fe7919aa5279dfe7d12e1a2e7aff1db92faba36 (diff) |
Config updates
Diffstat (limited to 'neovim/.config/nvim/lua/plugins/goyo.lua')
-rw-r--r-- | neovim/.config/nvim/lua/plugins/goyo.lua | 19 |
1 files changed, 18 insertions, 1 deletions
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 }) |