diff options
| author | João Távora | 2025-11-12 13:54:49 +0000 |
|---|---|---|
| committer | João Távora | 2025-11-12 14:04:15 +0000 |
| commit | c34e32e4b0551a5e261bae73d65438b5e0c58745 (patch) | |
| tree | 9fd8c7476473e462d29a719e988689a8b5827fd1 | |
| parent | 916c73e55a07a728071201f0a13f7f63e76350df (diff) | |
| download | emacs-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.texi | 14 | ||||
| -rw-r--r-- | etc/EGLOT-NEWS | 11 |
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 | ||
| 509 | Finally, it's worth noting that, by default, Eglot generally turns on | 509 | Finally, it's worth noting that, by default, Eglot generally turns on |
| 510 | all features that it @emph{can} turn on. It's possible to opt out of | 510 | all features that it @emph{can} turn on. It's possible to opt out of |
| 511 | some features via user options (@pxref{Customizing Eglot}) and a hook | 511 | features via the @code{eglot-ignored-server-capabilities} user option |
| 512 | (@pxref{Customizing Eglot}) and the @code{eglot-managed-mode-hook} hook | ||
| 512 | that runs after Eglot starts managing a buffer (@pxref{Eglot and | 513 | that runs after Eglot starts managing a buffer (@pxref{Eglot and |
| 513 | Buffers}). | 514 | Buffers}). |
| 514 | 515 | ||
| @@ -638,6 +639,17 @@ minor mode is turned on and when it's turned off; use the function | |||
| 638 | or not. | 639 | or not. |
| 639 | @end itemize | 640 | @end itemize |
| 640 | 641 | ||
| 642 | For example, to turn off @dfn{inlay hints} and @dfn{semantic tokens} by | ||
| 643 | default but still retain the ability to turn them on again | ||
| 644 | interactively 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 | ||
| 25 | The new minor mode 'eglot-semantic-tokens-mode' provides enhanced syntax | 25 | The new minor mode 'eglot-semantic-tokens-mode' provides enhanced syntax |
| 26 | highlighting based on the language server's semantic analysis of the | 26 | highlighting based on the language server's analysis, going beyond |
| 27 | code, going beyond traditional regular-expression-based fontification. | 27 | traditional regular-expression-based fontification. The |
| 28 | The 'eglot-semantic-faces' customization group contains options for | 28 | 'eglot-semantic-faces' customization group contains options for |
| 29 | controlling which token types and modifiers to consider, as well as | 29 | controlling which token types and modifiers to consider, as well as |
| 30 | faces for customizing their appearance. | 30 | faces for customizing their appearance. The minor mode is on by |
| 31 | 31 | default: 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 |