dracula / vim

🧛🏻‍♂️ Dark theme for Vim
https://draculatheme.com/vim
MIT License
1.34k stars 454 forks source link

Fix don't interrupt the cursorline #299

Closed saccarosium closed 1 year ago

saccarosium commented 1 year ago

Fix #295

before Screenshot 2022-12-01 at 20 03 20

after Screenshot 2022-12-01 at 20 01 07

benknoble commented 1 year ago

Hiya, sorry I've let this sit so long.

The screens look good, but can you explain why the fixes work? How certain are we they won't impact other highlights? For example, while I don't use NeoVim or Treesitter, I sometimes prefer to dim brackets dramatically. (To be clear, I don't think there are any issues, but I'm not 100% convinced yet.)

saccarosium commented 1 year ago

The problem, same as in #295, is that because in some treesitter highilight groups were linked to Normal caused the cursorline to be "interrupted". The reason why is that Vim by default, if you don't assign anything to the bg highilght property, will make it something like hi <highlight> fg=<color> bg=NONE. But by linking an highilght to Normal you are overwriting that NONE with the Normal backgroud (which is the colorscheme background). The fix make it so instead of linking to Normal is linking to DraculaFg, which preserve the NONE background, making so the cursorline is not interrupted.

How certain are we they won't impact other highlights? For example, while I don't use NeoVim or Treesitter, I sometimes prefer to dim brackets dramatically.

The fix will not affect any other highlights because I simply substitute Normal with DraculaFg, which are exatcly the same exept that DraculaFg has a bg=NONE.

Hope I explained the fix.