Fork me on GitHub
#calva
<
2022-11-27
>
skylize23:11:02

Bringing this here from https://github.com/BetterThanTomorrow/calva/issues/1973#issuecomment-1328060407 to reduce noise on the issue: > You probably have semantic tokens disabled. --@pez I don't know of any settings that would "disable semantic tokens". Could you elaborate?

skylize00:11:05

Oh, I think I found what you are talking about. Looks like my theme must have been disabling it. And since my theme also has no inbuilt features for Clojure, I now I've got to go back in an figure out what scopes I need to assign colors to allow using semantic tokens. I wonder if there should be any mention of semantic highlighting in Calva docs somewhere?

pez06:11:28

What happens if you set semantic highlighting to true?

pez06:11:53

We could inform more about what clojure-lsp brings to the user, in general, for sure.

skylize14:11:10

If I set it to true, keywords get a semantic scope that overrides the textmate scope. That semantic scope does seem to hold as a keyword when adding a |, as you described in the issue. But for Clojure this theme only manages to provide 2 text colors. I had to dig up the rest of the color palette from the theme source code and match colors to scopes myself in settings.json. The semantic scope causes all keywords to fall back one of those original 2 colors, a color which should now only show on special forms. So I have to keep it disabled until I can fix that and hunt down any other similar overrides.