Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for semantic tokens #112

Open
gegoune opened this issue Mar 25, 2023 · 4 comments
Open

Support for semantic tokens #112

gegoune opened this issue Mar 25, 2023 · 4 comments

Comments

@gegoune
Copy link

gegoune commented Mar 25, 2023

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.

@mcchrish
Copy link
Collaborator

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.

@gegoune
Copy link
Author

gegoune commented Mar 27, 2023

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.

@tkgalk
Copy link

tkgalk commented Apr 8, 2023

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.

@mcchrish
Copy link
Collaborator

mcchrish commented Apr 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants