1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Eglot: clarify how to turn off semantic tokens

* doc/misc/eglot.texi (Eglot Features, Eglot and Buffers):
Tweak.
This commit is contained in:
João Távora 2025-11-12 13:54:49 +00:00
parent 916c73e55a
commit c34e32e4b0
2 changed files with 19 additions and 6 deletions

View file

@ -508,7 +508,8 @@ capabilities to Emacs users. However, @xref{Extending Eglot}.
Finally, it's worth noting that, by default, Eglot generally turns on
all features that it @emph{can} turn on. It's possible to opt out of
some features via user options (@pxref{Customizing Eglot}) and a hook
features via the @code{eglot-ignored-server-capabilities} user option
(@pxref{Customizing Eglot}) and the @code{eglot-managed-mode-hook} hook
that runs after Eglot starts managing a buffer (@pxref{Eglot and
Buffers}).
@ -638,6 +639,17 @@ minor mode is turned on and when it's turned off; use the function
or not.
@end itemize
For example, to turn off @dfn{inlay hints} and @dfn{semantic tokens} by
default but still retain the ability to turn them on again
interactively use this:
@lisp
(add-hook 'eglot-managed-mode-hook
(lambda ()
(eglot-inlay-hints-mode -1)
(eglot-semantic-tokens-mode -1)))
@end lisp
@node Eglot Commands
@section Eglot Commands
@cindex commands, Eglot

View file

@ -23,13 +23,14 @@ https://github.com/joaotavora/eglot/issues/1234.
** Support for semantic tokens (bug#79374)
The new minor mode 'eglot-semantic-tokens-mode' provides enhanced syntax
highlighting based on the language server's semantic analysis of the
code, going beyond traditional regular-expression-based fontification.
The 'eglot-semantic-faces' customization group contains options for
highlighting based on the language server's analysis, going beyond
traditional regular-expression-based fontification. The
'eglot-semantic-faces' customization group contains options for
controlling which token types and modifiers to consider, as well as
faces for customizing their appearance.
faces for customizing their appearance. The minor mode is on by
default: consult the manual on how to turn it off.
* Changes in Eglot 1.19 (23/10/2025)
** Support for call and type hierarchies