GNU bug report logs - #79374
[PATCH] eglot: add support for semantic tokens

Previous Next

Package: emacs;

Reported by: me <at> lua.blog.br

Date: Wed, 3 Sep 2025 00:43:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Philip Kaludercic <philipk <at> posteo.net>
To: "Lua V. R." <me <at> lua.blog.br>
Cc: 79374 <at> debbugs.gnu.org, João Távora <joaotavora <at> gmail.com>
Subject: bug#79374: [PATCH] eglot: add support for semantic tokens
Date: Wed, 03 Sep 2025 08:01:18 +0000
"Lua V. R." <me <at> lua.blog.br> writes:


[...]

> +(define-minor-mode eglot-semantic-tokens-mode
> +  "Minor mode for fontifying buffer with LSP server's semantic tokens."
> +  :global nil
> +  (cond (eglot-semantic-tokens-mode
> +         (if (eglot-server-capable :semanticTokensProvider)
> +             (jit-lock-register #'eglot--semtok-fontify 'contextual)
> +           (eglot-semantic-tokens-mode -1)))
> +        (t
> +         (jit-lock-unregister #'eglot--semtok-fontify)
> +         (with-silent-modifications
> +           (remove-list-of-text-properties (point-min) (point-max) '(font-lock-face))))))
> +
>  
>  ;;; Call and type hierarchies
>  (require 'button)
> @@ -4728,7 +5048,8 @@ If NOERROR, return predicate, else erroring function."
>  ;; harder. For now, use `with-eval-after-load'. See also github#1183.
>  (with-eval-after-load 'desktop
>    (add-to-list 'desktop-minor-mode-handlers '(eglot--managed-mode . ignore))
> -  (add-to-list 'desktop-minor-mode-handlers '(eglot-inlay-hints-mode . ignore)))
> +  (add-to-list 'desktop-minor-mode-handlers '(eglot-inlay-hints-mode . ignore))
> +  (add-to-list 'desktop-minor-mode-handlers '(eglot-semtok-mode . ignore)))
                                                 ^

As mentioned on Emacs-devel, shouldn't this be `eglot-semantic-tokens-mode'.

(Also, this is of course not a detailed review I just skimmed over the
code this morning, but for the most part it looks good!)

[...]


-- 
Philip Kaludercic




This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.