aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2025-11-12 13:54:49 +0000
committerJoão Távora2025-11-12 14:04:15 +0000
commitc34e32e4b0551a5e261bae73d65438b5e0c58745 (patch)
tree9fd8c7476473e462d29a719e988689a8b5827fd1
parent916c73e55a07a728071201f0a13f7f63e76350df (diff)
downloademacs-c34e32e4b0551a5e261bae73d65438b5e0c58745.tar.gz
emacs-c34e32e4b0551a5e261bae73d65438b5e0c58745.zip
Eglot: clarify how to turn off semantic tokens
* doc/misc/eglot.texi (Eglot Features, Eglot and Buffers): Tweak.
-rw-r--r--doc/misc/eglot.texi14
-rw-r--r--etc/EGLOT-NEWS11
2 files changed, 19 insertions, 6 deletions
diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi
index 73dea276f15..3393f164138 100644
--- a/doc/misc/eglot.texi
+++ b/doc/misc/eglot.texi
@@ -508,7 +508,8 @@ capabilities to Emacs users. However, @xref{Extending Eglot}.
508 508
509Finally, it's worth noting that, by default, Eglot generally turns on 509Finally, it's worth noting that, by default, Eglot generally turns on
510all features that it @emph{can} turn on. It's possible to opt out of 510all features that it @emph{can} turn on. It's possible to opt out of
511some features via user options (@pxref{Customizing Eglot}) and a hook 511features via the @code{eglot-ignored-server-capabilities} user option
512(@pxref{Customizing Eglot}) and the @code{eglot-managed-mode-hook} hook
512that runs after Eglot starts managing a buffer (@pxref{Eglot and 513that runs after Eglot starts managing a buffer (@pxref{Eglot and
513Buffers}). 514Buffers}).
514 515
@@ -638,6 +639,17 @@ minor mode is turned on and when it's turned off; use the function
638or not. 639or not.
639@end itemize 640@end itemize
640 641
642For example, to turn off @dfn{inlay hints} and @dfn{semantic tokens} by
643default but still retain the ability to turn them on again
644interactively use this:
645
646@lisp
647 (add-hook 'eglot-managed-mode-hook
648 (lambda ()
649 (eglot-inlay-hints-mode -1)
650 (eglot-semantic-tokens-mode -1)))
651@end lisp
652
641@node Eglot Commands 653@node Eglot Commands
642@section Eglot Commands 654@section Eglot Commands
643@cindex commands, Eglot 655@cindex commands, Eglot
diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS
index 7de81c5686e..d9999248a31 100644
--- a/etc/EGLOT-NEWS
+++ b/etc/EGLOT-NEWS
@@ -23,13 +23,14 @@ https://github.com/joaotavora/eglot/issues/1234.
23** Support for semantic tokens (bug#79374) 23** Support for semantic tokens (bug#79374)
24 24
25The new minor mode 'eglot-semantic-tokens-mode' provides enhanced syntax 25The new minor mode 'eglot-semantic-tokens-mode' provides enhanced syntax
26highlighting based on the language server's semantic analysis of the 26highlighting based on the language server's analysis, going beyond
27code, going beyond traditional regular-expression-based fontification. 27traditional regular-expression-based fontification. The
28The 'eglot-semantic-faces' customization group contains options for 28'eglot-semantic-faces' customization group contains options for
29controlling which token types and modifiers to consider, as well as 29controlling which token types and modifiers to consider, as well as
30faces for customizing their appearance. 30faces for customizing their appearance. The minor mode is on by
31 31default: consult the manual on how to turn it off.
32 32
33
33* Changes in Eglot 1.19 (23/10/2025) 34* Changes in Eglot 1.19 (23/10/2025)
34 35
35** Support for call and type hierarchies 36** Support for call and type hierarchies