svampkorg / moody.nvim

A plugin for neovim which changes the colour of CursorColumn depending on mode.
MIT License
78 stars 0 forks source link

feature: Add CursorLineNr bg color #11

Open leokang94 opened 6 days ago

leokang94 commented 6 days ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

Nope. Just wanted.

Describe the solution you'd like

I would like to below.

opts = {
  bg_nr = true -- default : false.. maybe? also, I named the options randomly. :>
}

Describe alternatives you've considered

When using this option, I think it would be nice to optionally apply a blended bg color like CursorLine to the bg of CursorLineNr as well, due to the added area in the config.lua > cache_colors_setup_highlighs function.

vim.api.nvim_set_hl(M.ns_normal, "CursorLineNr", { fg = M.options.hl_unblended.normal, bold = M.options.bold_nr })

-- when bg_nr is true, additional set the bg color
if (M.options.bg_nr) then
  vim.api.nvim_set_hl(M.ns_normal, "CursorLineNr", { bg = M.options.hl_blended.normal })
end

(I'm not familiar with the lua, so... I don't know if there is a more concise syntax.)

Additional context

When I temporarily set it up myself, it looks like this. (yes, I changed blend) image image image

svampkorg commented 6 days ago

Hello! Thanks for using my plugin 👍 I think this is a great addition, and I will start working on it as soon as I find time!