diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 6c1cc842..474a4774 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -7,9 +7,6 @@ vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 --- Set the blinking cursor settings -vim.o.guicursor = 'n-v:block,i:ver25,r-cr-o:hor20,a:blinkwait700-blinkoff400-blinkon250' - -- Make sure, that when we exit nvim the previous cursor settings get restored vim.cmd [[ augroup RestoreCursorShapeOnExit @@ -18,6 +15,14 @@ vim.cmd [[ augroup END ]] +-- Set the blinking cursor settings +vim.api.nvim_create_autocmd('VimEnter', { + callback = function() + vim.notify 'Setting guicursor via VimEnter' + vim.opt.guicursor = 'n-v:block,i:ver25,r-cr-o:hor20,a:blinkwait700-blinkoff400-blinkon250' + end, +}) + -- Remap for dealing with word wrap in v mode vim.keymap.set('v', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) vim.keymap.set('v', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })