alacritty: Cursor doesn't behave according to Vim/Neovim's settings

System

OS: Windows Version: 0.7.0-dev (f701b22)

Description

There are some issues with the cursor. For instance if I put the following in my init.vim/vimrc:

highlight Cursor ctermbg=white ctermfg=white guibg=white guifg=white

The cursor should become completely white. But that doesn’t happen. No matter what I do, the cursor foreground (aka character) doesn’t change color, only the cursor background changes.

Another issue is with the shape… Put the following in init.vim/vimrc:

set guicursor = a:hor20-Cursor

The cursor should become an horizontal bar that’s 20% filled. Instead, what happens is that it becomes a thin horizontal bar, no matter what percentage I specify. The same applies to the vertical cursor. It seems that the only possible cursor shapes are block cursor, thin vertical cursor and thin horizontal cursor, but nothing in between.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (4 by maintainers)

Most upvoted comments

I think the solution should be on Vim side. Add this into your vimrc:

augroup reset_cursor_shape
  au!
  autocmd VimEnter * normal! :startinsert :stopinsert
  autocmd VimEnter * redraw!
augroup END

See if it makes a difference. A detailed description can be found in this wiki page of my dotfiles.

There’s an option in the configuration file to set the thickness of those cursors.