diff options
| author | Eli Zaretskii | 2022-10-20 16:47:26 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2022-10-20 16:47:26 +0300 |
| commit | 9655b5b65f8a4265655a42cf6d42528944216e99 (patch) | |
| tree | 057d66cf6f109f5e37c0c3621a40be2f32e12ec1 | |
| parent | df31a36f69d29502bba6e32047d660dc014668ab (diff) | |
| download | emacs-feature/eglot2emacs.tar.gz emacs-feature/eglot2emacs.zip | |
; * doc/misc/eglot.texi: Undo recent "fixes" to the Eglot manual.feature/eglot2emacs
| -rw-r--r-- | doc/misc/eglot.texi | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index c1de1e818dc..ecbab1d1bb1 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi | |||
| @@ -185,10 +185,8 @@ further discussed in this manual; refer to the documentation of the | |||
| 185 | particular server(s) you want to install. | 185 | particular server(s) you want to install. |
| 186 | 186 | ||
| 187 | To use a language server, Eglot must know how to start it and which | 187 | To use a language server, Eglot must know how to start it and which |
| 188 | programming languages each server supports. Eglot comes with a fairly | 188 | programming languages each server supports. This information is |
| 189 | complete set of associations of major-modes to popular language | 189 | provided by the variable @code{eglot-server-programs}. |
| 190 | servers predefined. This information is provided by the | ||
| 191 | @code{eglot-server-programs} variable. | ||
| 192 | 190 | ||
| 193 | @defvar eglot-server-programs | 191 | @defvar eglot-server-programs |
| 194 | This variable associates major modes with names and command-line | 192 | This variable associates major modes with names and command-line |
| @@ -203,13 +201,13 @@ The value of the variable is an alist, whose elements are of the form | |||
| 203 | The @var{major-mode} of the alist elements can be either a symbol of | 201 | The @var{major-mode} of the alist elements can be either a symbol of |
| 204 | an Emacs major mode or a list of the form @w{@code{(@var{mode} | 202 | an Emacs major mode or a list of the form @w{@code{(@var{mode} |
| 205 | :language-id @var{id})}}, with @var{mode} being a major-mode symbol | 203 | :language-id @var{id})}}, with @var{mode} being a major-mode symbol |
| 206 | and @var{id} a string that identifies the language to the server. The | 204 | and @var{id} a string that identifies the language to the server (if |
| 207 | latter form should be used if Eglot cannot by itself convert the | 205 | Eglot cannot by itself convert the major-mode to the language |
| 208 | major-mode to the language identifier string required by the server. | 206 | identifier string required by the server). In addition, |
| 209 | In addition, @var{major-mode} can be a list of several major modes | 207 | @var{major-mode} can be a list of several major modes specified in one |
| 210 | specified in one of the above forms -- this means a running instance | 208 | of the above forms -- this means a running instance of the associated |
| 211 | of the associated server is responsible for files of multiple major | 209 | server is responsible for files of multiple major modes or languages |
| 212 | modes or languages in the project. | 210 | in the project. |
| 213 | 211 | ||
| 214 | The @var{server} part of the alist elements can be one of the | 212 | The @var{server} part of the alist elements can be one of the |
| 215 | following: | 213 | following: |
| @@ -251,11 +249,13 @@ arguments. | |||
| 251 | 249 | ||
| 252 | @end defvar | 250 | @end defvar |
| 253 | 251 | ||
| 254 | If you need to add server associations to the default list, use | 252 | Eglot comes with a fairly complete set of associations of major-modes |
| 255 | @code{add-to-list}. For example, if there is a hypothetical language | 253 | to popular language servers predefined. If you need to add server |
| 256 | server program @command{fools} for the language @code{Foo} which is | 254 | associations to the default list, use @code{add-to-list}. For |
| 257 | supported by an Emacs major-mode @code{foo-mode}, you can add it to | 255 | example, if there is a hypothetical language server program |
| 258 | the alist like this: | 256 | @command{fools} for the language @code{Foo} which is supported by an |
| 257 | Emacs major-mode @code{foo-mode}, you can add it to the alist like | ||
| 258 | this: | ||
| 259 | 259 | ||
| 260 | @lisp | 260 | @lisp |
| 261 | (add-to-list 'eglot-server-programs | 261 | (add-to-list 'eglot-server-programs |
| @@ -372,7 +372,8 @@ commands and variables. | |||
| 372 | Once Eglot is enabled in a buffer, it uses LSP and the language-server | 372 | Once Eglot is enabled in a buffer, it uses LSP and the language-server |
| 373 | capabilities to activate, enable, and enhance modern IDE features in | 373 | capabilities to activate, enable, and enhance modern IDE features in |
| 374 | Emacs. The features themselves are usually provided via other Emacs | 374 | Emacs. The features themselves are usually provided via other Emacs |
| 375 | packages. These are the main features that Eglot enables and provides: | 375 | packages. Here's the list of the main features that Eglot enables and |
| 376 | provides: | ||
| 376 | 377 | ||
| 377 | @itemize @bullet | 378 | @itemize @bullet |
| 378 | @item | 379 | @item |
| @@ -395,7 +396,7 @@ emacs, GNU Emacs Manual}). Eglot provides a backend for the Xref | |||
| 395 | capabilities which uses the language-server understanding of the | 396 | capabilities which uses the language-server understanding of the |
| 396 | program source. In particular, it eliminates the need to generate | 397 | program source. In particular, it eliminates the need to generate |
| 397 | tags tables (@pxref{Tags tables,,, emacs, GNU Emacs Manual}) for | 398 | tags tables (@pxref{Tags tables,,, emacs, GNU Emacs Manual}) for |
| 398 | languages that are only supported by the @code{etags} backend. | 399 | languages which are only supported by the @code{etags} backend. |
| 399 | 400 | ||
| 400 | @item | 401 | @item |
| 401 | Buffer navigation by name of function, class, method, etc., via Imenu | 402 | Buffer navigation by name of function, class, method, etc., via Imenu |
| @@ -507,7 +508,7 @@ directory. | |||
| 507 | 508 | ||
| 508 | @item | 509 | @item |
| 509 | A VC project: source files in a directory hierarchy under some VCS, | 510 | A VC project: source files in a directory hierarchy under some VCS, |
| 510 | e.g.@: a Git repository (@pxref{Version Control,,, emacs, GNU Emacs | 511 | e.g.@: a VCS repository (@pxref{Version Control,,, emacs, GNU Emacs |
| 511 | Manual}). | 512 | Manual}). |
| 512 | 513 | ||
| 513 | @item | 514 | @item |
| @@ -620,9 +621,8 @@ will be added to those managed by an existing server session. | |||
| 620 | The command attempts to figure out the buffer's major mode and the | 621 | The command attempts to figure out the buffer's major mode and the |
| 621 | suitable language server; in case it fails, it might prompt for the | 622 | suitable language server; in case it fails, it might prompt for the |
| 622 | major mode to use and for the server program to start. If invoked | 623 | major mode to use and for the server program to start. If invoked |
| 623 | with a prefix argument @kbd{C-u}, it always prompts for the server | 624 | with @kbd{C-u}, it always prompts for the server program, and if |
| 624 | program, and if invoked with @kbd{C-u C-u}, also prompt for the major | 625 | invoked with @kbd{C-u C-u}, it also prompts for the major mode. |
| 625 | mode. | ||
| 626 | 626 | ||
| 627 | If the language server is successfully started and contacted, this | 627 | If the language server is successfully started and contacted, this |
| 628 | command arranges for any other buffers belonging to the same project | 628 | command arranges for any other buffers belonging to the same project |
| @@ -637,13 +637,13 @@ Emacs features will be configured to use Eglot, use the | |||
| 637 | @code{eglot-stay-out-of} option (@pxref{Customizing Eglot}). | 637 | @code{eglot-stay-out-of} option (@pxref{Customizing Eglot}). |
| 638 | 638 | ||
| 639 | @item M-x eglot-reconnect | 639 | @item M-x eglot-reconnect |
| 640 | Shuts down an the current connection to the language server and | 640 | This command shuts down the current connection to the language |
| 641 | immediately restarts it using the same options used originally. This | 641 | server and immediately restarts it using the same options used |
| 642 | can sometimes be useful to unclog a partially malfunctioning server | 642 | originally. This can sometimes be useful to unclog a partially |
| 643 | connection. | 643 | malfunctioning server connection. |
| 644 | 644 | ||
| 645 | @item M-x eglot-shutdown | 645 | @item M-x eglot-shutdown |
| 646 | Shuts down a language server. This commands prompts for a language | 646 | This command shuts down a language server. It prompts for a language |
| 647 | server to shut down (unless there's only one server session, and it | 647 | server to shut down (unless there's only one server session, and it |
| 648 | manages the current buffer). Then the command shuts down the server | 648 | manages the current buffer). Then the command shuts down the server |
| 649 | and stops managing the buffers the server was used for. Emacs | 649 | and stops managing the buffers the server was used for. Emacs |