rasulomaroff / reactive.nvim

Reactivity. Right in your neovim.
Apache License 2.0
183 stars 1 forks source link

Cursor Color #6

Closed bartopine closed 6 months ago

bartopine commented 6 months ago

Hello .. I am trying to change the color of my cursor whenever I enter insertmode but i am not successful in doing so. I have manage to change the cursorlineNr etc. But changing the color of the Cursor itself seems not to work. 123

I am really happy with the plugin so far! :)

rasulomaroff commented 6 months ago

Hi there! The thing is that the Cursor highlights aren't supported in 'winhighlight' option in Neovim (and actually it makes no sense since there aren't multiple cursors yet). Just move it to the hl section

modes = {
  i = {
    hl = {
      Cursor = { bg = '#fabd2f' }
    },
    winhl = {
      -- your other highlights
    }
  }
}
bartopine commented 6 months ago

Thank you for the help! .. The color still does not change eventhough i have moved it to the hl section.. I think it has something to do with the fact that I am using Windows Terminal .. but thanks a lot anyways 👍

rasulomaroff commented 6 months ago

@bartopine you can take a look at this file inside the repo: https://github.com/rasulomaroff/reactive.nvim/blob/main/lua/reactive/builtin/cursor.lua

Maybe you misspelled something. Is Cursor highlight actually applied to your vim.opt.guicursor option?

bartopine commented 6 months ago

Hello!..

I have tried doing the same thing but still .. i can't manage to make the Cursor change it's colors.

here is my setting .. 123

rasulomaroff commented 6 months ago

@bartopine look at your 6 and 4 relative lines. after vim.opt.guicursor:append("a:CustomCursor") you're setting it to the empty line with vim.o.guicursor = "" Remove the latter