From 38c01e545c478fa5305bd81fdf7150d2f129822d Mon Sep 17 00:00:00 2001 From: rootiest Date: Sat, 8 Feb 2025 21:29:59 -0500 Subject: [PATCH] update blinky behavior to use new lua functions --- lua/utils/blinky.lua | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lua/utils/blinky.lua b/lua/utils/blinky.lua index 5062889..7063aed 100644 --- a/lua/utils/blinky.lua +++ b/lua/utils/blinky.lua @@ -6,13 +6,24 @@ local M = {} --- Function to set up blinky cursor ---@return boolean state true if the cursor is enabled, false otherwise function M.enable() + -- Set the cursor to a blinking state + -- vim.opt.guicursor = { + -- 'n-v-c:block-Cursor/lCursor', -- Block cursor in normal, visual, and command modes + -- 'i:ver25-blinkwait700-blinkoff400-blinkon250-Cursor/lCursor', -- Blinking vertical line in insert mode + -- 'r-cr-o:hor20-Cursor/lCursor', -- Horizontal line cursor in replace, command-line replace, and operator-pending modes + -- 'a:blinkwait700-blinkoff400-blinkon250', -- Global blinking settings for all modes + -- } + -- Set the cursor to a blinking state vim.opt.guicursor = { - "n-v-c:block-Cursor/lCursor", -- Block cursor in normal, visual, and command modes - "i:ver25-blinkwait700-blinkoff400-blinkon250-Cursor/lCursor", -- Blinking vertical line in insert mode - "r-cr-o:hor20-Cursor/lCursor", -- Horizontal line cursor in replace, command-line replace, and operator-pending modes - "a:blinkwait700-blinkoff400-blinkon250", -- Global blinking settings for all modes + 'n-v-c:block', + 'i-ci-ve:ver25', + 'r-cr:hor20', + 'o:hor50', + 'a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor', + 'sm:block-blinkwait175-blinkoff250-blinkon175', } + return true end @@ -20,7 +31,7 @@ end ---@return boolean state true if the cursor is enabled, false otherwise function M.disable() -- Set the cursor to a non-blinking state - vim.opt.guicursor = "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20" + vim.opt.guicursor = 'n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20' return false end