Recently, I started using lunarVim and encountered a very annoying problem. By default, my cursor was blinking, but after some lunarVim operations, the cursor in the terminal turned into a square shape... This is really frustrating.
This is a normal cursor#
After the operation#
It really feels uncomfortable like this...
I searched for a solution for a while and finally found a mysterious line of code on GitHub. Just add the following code to .config/lvim/config.lua
:
lvim.autocommands = {
{
"VimLeave",
{
pattern = "*",
command = "set guicursor= | call chansend(v:stderr, \"\x1b[ q\")"
}
}
}
This perfectly solves the headache problem. Thanks to this guy:
https://gist.github.com/nishantwrp/1736251d801f180c996fb5c33333191d