emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.72k stars 861 forks source link

Fix client settings cannot be overridden #4383

Closed vljosa-vivodyne closed 3 months ago

vljosa-vivodyne commented 3 months ago

Create hash table with :test 'equal so that lsp-register-custom-settings can be called again to override settings.

Resolves #4382

yyoncho commented 3 months ago

Thank you!

alanz commented 3 months ago

FYI, this change causes my semantic tokens to disappear in rust-mode, set up as

(use-package lsp-mode
  :hook (scala-mode rust-mode rust-ts-mode)
  ...
  :custom
  (lsp-semantic-tokens-enable t)
...

If I comment it out, they come back.

vljosa-vivodyne commented 3 months ago

@alanz, I'm not able to reproduce. I'm not sure I fully understand how semantic tokens are supposed to work, but I think the pink distance_to in let distance = point_a.distance_to(&point_b); means it's working. (At least that's something that changes with (lsp-semantic-tokens-enable t).)

If I'm wrong, can you please give a piece of example code and explain how to see whether semantic tokens are working so I can try again to reproduce?

image
alanz commented 3 months ago

For rust analyzer, references will show up bold, and mutable items underlined. So making a small change to RA code, I get

Screenshot 2024-03-20 at 15 33 08

ra_fixture is both bold and underlined. If you remove the mut (as it normally is), the underline disappears.

alanz commented 3 months ago

We chose bold and underline to keep things simple for themes

alanz commented 3 months ago

And after the update today it works. And I don't see anything in the commit history that could have done it. It must have been some other part that updated. Sorry for the noise.