andersevenrud / nordic.nvim

A nord-esque colorscheme for neovim
MIT License
174 stars 12 forks source link

Add/change highlight groups #48

Closed gegoune closed 2 years ago

gegoune commented 2 years ago

What's the best way to add more groups (and maybe slightly override existing ones, for Telescope in my case) having access to colours defined in the scheme?

I was thinking, maybe some interface (from setup()) where one could have some callbacks receiving same arguments as functions in lua/nordic/colors/?

andersevenrud commented 2 years ago

If you only need the palette, then you can just do this:

local palette = require('nordic.palette')
vim.highlight.create('TelescopeSomething', { guifg = palette.red })

If you need the other stuff, then this could be exposed in the configuration options as a callback I suppose :thinking:

gegoune commented 2 years ago

Ah yeah, being able to use cs.bg('telescope') would be what I need for that very case.

andersevenrud commented 2 years ago

Try https://github.com/andersevenrud/nordic.nvim/pull/49 . It gives you the option to define colors just like in this codebase via the discussed callback.

gegoune commented 2 years ago

Works very nice and is exactly what I had in mind. So quick, thank you!

andersevenrud commented 2 years ago

Great! Then I'll merge it :smile: