mawkler / modicator.nvim

Cursor line number mode indicator plugin for Neovim
MIT License
298 stars 6 forks source link

Line color dosen't change when entering Neovim #1

Closed Isrothy closed 1 year ago

Isrothy commented 1 year ago

When I enter Neovim, for example, nvim a.cpp, I enter normal mode but the colour dosen't change. However, after that when I type i and enter insert mode, the colour does change. When I type ESC and change back to normal mode, the plugin works well (the colour is all right).

Isrothy commented 1 year ago

I guess the reason maybe the event to trigger autocmd is ModeChanged and when I enter Neovim, the mode doesn't change.

Isrothy commented 1 year ago

Or I should change the highlight colour of CursorLineNr right?

mawkler commented 1 year ago

@Isrothy Hello! Is the first normal mode color different from the normal mode color after you've switched to insert mode and back? And what does your configuration look like?

The initial highlighting when you enter Neovim is whatever CursorLineNr is set to. When you switch to another mode and back to normal mode, Modicator uses the value of your config's highlights.modes.n, which is CursorLineNr's fg by default.

Isrothy commented 1 year ago

Thank you very much! I manually set CursorLineNr and the problem is solved.