qfdk

qfdk

喜欢碎碎念的小 🐭, 对开源情有独钟, 会说 🇫🇷, 喜欢折腾 “黑科技”, 徒步是日常
github

lunarVim Cursor Quick Fix

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#

image

After the operation#

image

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

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.