Closed unikitty37 closed 1 year ago
The customizations are indeed correct. Not sure why it isn't working. Can you try changing this config?
{
"editor.semanticHighlighting.enabled": true,
}
Maybe the theme doesn't support semantic highlighting and your editor is configured to enable it based on theme configurations.
You can also use the token inspector to verify that you're looking at the right tokens.
Thanks — I've tried enabling semantic highlighting globally, rather than specifically for the theme, but it still doesn't seem to pick it up. The theme has semanticHighlighting: true
set: https://github.com/diep89/darcula-intellij-theme-extended/blob/cc88fd727626ef94ee5210817c19e811a152a3c9/themes/darcula-intellij-theme-extended-color-theme.json#LL753
Based on the token inspection, you can see that only textmate scopes are being applied. It's not showing any semantic token information.
Is the Ruby LSP running properly to provide the semantic tokens?
This is the information that needs to show up if the Ruby LSP is running and providing semantic information. Notice that there's a section for the semantic information, which is missing for you.
Thanks — it seems I ran into the same issue I had in #443. Adding a basic Gemfile with rubocop in it allowed the LSP to start:
# frozen_string_literal: true
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '3.1.3'
gem 'rubocop', '~> 1.39.0', require: false
Now I just need to pick some colours I like 😁
I find the Spinel theme to be much too bright (and very distracting as a result) so I'm using Darcula IntelliJ Theme Extended instead. It doesn't have the semantic token colours needed for Ruby, though.
I've tried adding this to
settings.json
but it doesn't seem to make any difference to what's displayed when I open a Ruby file — I still the the same as if I hadn't added this JSON.(Yes, those two colours are also garish, but I wanted to be sure I could see them change while I was experimenting :)
Am I actually configuring this correctly?