I have this autocmd plugin to change my cursor color to specific modes. Without it, it works normally, but with it, it doesn't. The correct color only appears when the cursor is moving; when it's stationary, it's white.
local mode_cursor_colors = {
n = "#f29554",
i = "#6bc99d",
v = "#9595d9",
V = "#9595d9",
["\22"] = "#9595d9",
R = "#f25146",
c = "#e3a824",
}
vim.api.nvim_create_autocmd("ModeChanged", {
callback = function()
local color = mode_cursor_colors[vim.fn.mode()] or "#f29554"
vim.api.nvim_set_hl(0, "Cursor", { fg = "NONE", bg = color })
vim.api.nvim_set_hl(0, "CursorLineNr", { fg = color, bold = true })
end,
})
I'm configuring it this way to get the hl from the "Cursor", but it turns white when it's idle.
require("smear_cursor").setup({
opts = {
cursor_color = "Cursor",
legacy_computing_symbols_support = false,
scroll_buffer_space = true,
smear_between_buffers = true,
smear_between_neighbor_lines = true,
smear_insert_mode = true,
},
})
I have this autocmd plugin to change my cursor color to specific modes. Without it, it works normally, but with it, it doesn't. The correct color only appears when the cursor is moving; when it's stationary, it's white.
I'm configuring it this way to get the hl from the "Cursor", but it turns white when it's idle.