From e7bfa8455785d188cc2b6cb6d34217ebe7ef5567 Mon Sep 17 00:00:00 2001 From: Thomas Dorsch Date: Wed, 13 Aug 2025 07:58:19 +0000 Subject: [PATCH] Try to fix blinking cursor. Probably neovim 0.11.2 has an issue --- lua/custom/plugins/init.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 })