zenbones.nvim icon indicating copy to clipboard operation
zenbones.nvim copied to clipboard

Support for semantic tokens

Open gegoune opened this issue 2 years ago • 4 comments

Hey there, with recently added support for semantic tokens I am wondering whether you would be against supporting it by default in zenbones. I am not sure how to solve it without making it too colourful but perhaps some faint backgrounds?

What is your opinion on the subject? Thanks.

gegoune avatar Mar 25 '23 21:03 gegoune

I'm open to it, but what kind of support would you like to add? By default neovim already add some initial links to some lsp types. They looks like a very good default already. We can copy tokyonight which sets some more links and also some specific more specific targeting.

mcchrish avatar Mar 26 '23 03:03 mcchrish

I really like minimalistic approach of your colorscheme but it feels like some valuable information could be missed without highlighting semantic tokens. I was more thinking in a realm of how to best highlight those tokens without adding too many colours to the theme. And yes, I agree, tokyonight is very good example of what's out there, it's just 'how it should look like' in zenbones family question is hard to answer.

gegoune avatar Mar 27 '23 18:03 gegoune

I'd actually love zenbones to retain its monochromatic look, but I wouldn't be against allowing me to tweak some semantic highlighting groups with underlines (like rust-analyzer does for VS Code for mutable variables) or even with colours if I feel like something is important enough. But even if colours are out of the picture: underlines, italics, bolds et cetera can still be used.

tkgalk avatar Apr 08 '23 14:04 tkgalk

That does sound pretty helpful, but I think it comes down to personal preference. You can always extend the colorscheme pretty easily like so: https://github.com/mcchrish/zenbones.nvim/blob/v3.1.0/doc/zenbones.md#extendoverride-highlights

So in the case of defining semantic highlights:

local lush = require "lush"
local base = require "zenbones"
local palette = require "zenbones.palette"

-- Create some specs
local specs = lush.parse(function(injected_functions)
	local sym = injected_functions.sym
	return {
		sym "@lsp.type.keyword" { base["@constant"], bg = palette.light.water },
	}
end)
-- Apply specs using lush tool-chain
lush.apply(lush.compile(specs))

I would like to see an example of it working in rust, then I think we can consider adding it to the specs.

mcchrish avatar Apr 09 '23 06:04 mcchrish