RRethy / base16-nvim

Neovim plugin for building a sync base16 colorscheme. Includes support for Treesitter and LSP highlight groups.
MIT License
523 stars 77 forks source link

Better contract when cursorline is enabled, and current line a comment line #98

Closed WindSoilder closed 6 months ago

WindSoilder commented 6 months ago

Hi, thank you for the good theme! I love using base16-gruvbox-dark-hard.

But sometimes I found it's hard to read comment when I enabled cursorline:

vim.opt.cursorline = true

And here is screenshot image

I think it would be good to make the current line readable

RRethy commented 6 months ago

The hlgroups are done using the same named color across all themes, as such some themes will have undesirable colors. Changing this would need a change across all themes which isn't great.

Instead, I'd recommend overriding that color yourself. Add a line like this to your init.lua:

vim.api.nvim_set_hl(0, 'CursorLine', {bg=require('base16-colorscheme').colors.base02})

Note: You'll want to change the bg color to fit what you want.