diff options
| author | João Távora | 2023-12-18 17:59:29 -0600 |
|---|---|---|
| committer | João Távora | 2023-12-18 18:20:17 -0600 |
| commit | 20e39a12e491ce82ee581b6d99a4e2770218e0c6 (patch) | |
| tree | 752033ac65f080a029903dad3b708fe1d9f4d346 | |
| parent | 6937182a0e7735e83377c757ae13292692b0cb85 (diff) | |
| download | emacs-20e39a12e491ce82ee581b6d99a4e2770218e0c6.tar.gz emacs-20e39a12e491ce82ee581b6d99a4e2770218e0c6.zip | |
; Small copyedits to doc/misc/eglot.texi
Motivated in part by bug#67870 and bug#67609.
* doc/misc/eglot.texi (Quick Start): Reword
(Eglot Features): Reword.
(Eglot Commands): Fix typo.
| -rw-r--r-- | doc/misc/eglot.texi | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index 5243a6530dc..eda93d84aff 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi | |||
| @@ -138,11 +138,10 @@ Turn on Eglot for your project. | |||
| 138 | To start using Eglot for a project, type @kbd{M-x eglot @key{RET}} in | 138 | To start using Eglot for a project, type @kbd{M-x eglot @key{RET}} in |
| 139 | a buffer visiting any file that belongs to the project. This starts | 139 | a buffer visiting any file that belongs to the project. This starts |
| 140 | the language server configured for the programming language of that | 140 | the language server configured for the programming language of that |
| 141 | buffer, and causes Eglot to start managing all the files of the | 141 | buffer, and causes Eglot to start @dfn{managing} file-visiting buffers |
| 142 | project which use the same programming language. This includes files | 142 | related to that programming language. This includes files that are |
| 143 | of a given project that are already visited at the time the | 143 | already visited at the time the @code{eglot} command is invoked, as |
| 144 | @code{eglot} command is invoked as well as files visited after this | 144 | well as any files visited after this invocation. |
| 145 | invocation. | ||
| 146 | 145 | ||
| 147 | The notion of a ``project'' used by Eglot is the same Emacs uses | 146 | The notion of a ``project'' used by Eglot is the same Emacs uses |
| 148 | (@pxref{Projects,,, emacs, GNU Emacs Manual}): in the simplest case, | 147 | (@pxref{Projects,,, emacs, GNU Emacs Manual}): in the simplest case, |
| @@ -405,11 +404,13 @@ commands and variables. | |||
| 405 | @section Eglot Features | 404 | @section Eglot Features |
| 406 | @cindex features in buffers supported by Eglot | 405 | @cindex features in buffers supported by Eglot |
| 407 | 406 | ||
| 408 | Once Eglot is enabled in a buffer, it uses LSP and the language-server | 407 | While Eglot is enabled in a buffer, it is said to be @dfn{managing} |
| 409 | capabilities to activate, enable, and enhance modern IDE features in | 408 | it, using LSP and the specific capabilities of the language server to |
| 410 | Emacs. The features themselves are usually provided via other Emacs | 409 | activate and enhance modern IDE features in Emacs. Some of these |
| 411 | packages. Here's the list of the main features that Eglot enables and | 410 | features are provided via other Emacs packages, and some via Eglot |
| 412 | provides: | 411 | directly (@pxref{Eglot Commands}). |
| 412 | |||
| 413 | Here's an overview of the main features that Eglot provides: | ||
| 413 | 414 | ||
| 414 | @itemize @bullet | 415 | @itemize @bullet |
| 415 | @item | 416 | @item |
| @@ -422,10 +423,11 @@ allows major modes to provide extensive help and documentation about | |||
| 422 | the program identifiers. | 423 | the program identifiers. |
| 423 | 424 | ||
| 424 | @item | 425 | @item |
| 425 | On-the-fly diagnostic annotations with server-suggested fixes, via the | 426 | On-the-fly diagnostic annotations, via the Flymake package |
| 426 | Flymake package (@pxref{Top,,, flymake, GNU Flymake manual}). This | 427 | (@pxref{Top,,, flymake, GNU Flymake manual}). Eglot's Flymake backend |
| 427 | improves and enhances the Flymake diagnostics, replacing the other | 428 | replaces other Flymake backends while it is managing a buffer, and |
| 428 | Flymake backends. | 429 | enhances diagnostics with interactive server-suggested fixes |
| 430 | (so-called @dfn{code actions}, @pxref{Eglot Commands}) | ||
| 429 | 431 | ||
| 430 | @item | 432 | @item |
| 431 | Finding definitions and uses of identifiers, via Xref (@pxref{Xref,,, | 433 | Finding definitions and uses of identifiers, via Xref (@pxref{Xref,,, |
| @@ -484,9 +486,17 @@ with @kbd{eglot-code-actions}. @xref{Eglot Commands}. | |||
| 484 | 486 | ||
| 485 | Not all servers support the full set of LSP capabilities, but most of | 487 | Not all servers support the full set of LSP capabilities, but most of |
| 486 | them support enough to enable the basic set of features mentioned | 488 | them support enough to enable the basic set of features mentioned |
| 487 | above. Conversely, some servers offer capabilities for which no | 489 | above. |
| 488 | equivalent Emacs package exists yet, and so Eglot cannot (yet) expose | 490 | |
| 489 | these capabilities to Emacs users. | 491 | Conversely, some servers offer capabilities for which no equivalent |
| 492 | Emacs package exists yet, and so Eglot cannot (yet) expose these | ||
| 493 | capabilities to Emacs users. However, @xref{Extending Eglot}. | ||
| 494 | |||
| 495 | Finally, it's worth noting that, by default, Eglot generally turns on | ||
| 496 | all features that it @emph{can} turn on. It's possible to opt out of | ||
| 497 | some features via user options (@pxref{Customizing Eglot}) and a hook | ||
| 498 | that runs after Eglot starts managing a buffer (@pxref{Eglot and | ||
| 499 | Buffers}). | ||
| 490 | 500 | ||
| 491 | @node Eglot and Buffers | 501 | @node Eglot and Buffers |
| 492 | @section Buffers, Projects, and Eglot | 502 | @section Buffers, Projects, and Eglot |
| @@ -694,7 +704,7 @@ requests for the language server to provide editing commands for | |||
| 694 | correcting, refactoring or beautifying your code. These commands may | 704 | correcting, refactoring or beautifying your code. These commands may |
| 695 | affect more than one visited file belonging to the project. | 705 | affect more than one visited file belonging to the project. |
| 696 | 706 | ||
| 697 | The command @code{eglot-code-actions} asks the server if there any | 707 | The command @code{eglot-code-actions} asks the server if there are any |
| 698 | code actions for any point in the buffer or contained in the active | 708 | code actions for any point in the buffer or contained in the active |
| 699 | region. If there are, you have the choice to execute one of them via | 709 | region. If there are, you have the choice to execute one of them via |
| 700 | the minibuffer. | 710 | the minibuffer. |