aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2022-10-20 16:47:26 +0300
committerEli Zaretskii2022-10-20 16:47:26 +0300
commit9655b5b65f8a4265655a42cf6d42528944216e99 (patch)
tree057d66cf6f109f5e37c0c3621a40be2f32e12ec1
parentdf31a36f69d29502bba6e32047d660dc014668ab (diff)
downloademacs-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.texi54
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
185particular server(s) you want to install. 185particular server(s) you want to install.
186 186
187To use a language server, Eglot must know how to start it and which 187To use a language server, Eglot must know how to start it and which
188programming languages each server supports. Eglot comes with a fairly 188programming languages each server supports. This information is
189complete set of associations of major-modes to popular language 189provided by the variable @code{eglot-server-programs}.
190servers 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
194This variable associates major modes with names and command-line 192This 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
203The @var{major-mode} of the alist elements can be either a symbol of 201The @var{major-mode} of the alist elements can be either a symbol of
204an Emacs major mode or a list of the form @w{@code{(@var{mode} 202an 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
206and @var{id} a string that identifies the language to the server. The 204and @var{id} a string that identifies the language to the server (if
207latter form should be used if Eglot cannot by itself convert the 205Eglot cannot by itself convert the major-mode to the language
208major-mode to the language identifier string required by the server. 206identifier string required by the server). In addition,
209In 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
210specified in one of the above forms -- this means a running instance 208of the above forms -- this means a running instance of the associated
211of the associated server is responsible for files of multiple major 209server is responsible for files of multiple major modes or languages
212modes or languages in the project. 210in the project.
213 211
214The @var{server} part of the alist elements can be one of the 212The @var{server} part of the alist elements can be one of the
215following: 213following:
@@ -251,11 +249,13 @@ arguments.
251 249
252@end defvar 250@end defvar
253 251
254If you need to add server associations to the default list, use 252Eglot comes with a fairly complete set of associations of major-modes
255@code{add-to-list}. For example, if there is a hypothetical language 253to popular language servers predefined. If you need to add server
256server program @command{fools} for the language @code{Foo} which is 254associations to the default list, use @code{add-to-list}. For
257supported by an Emacs major-mode @code{foo-mode}, you can add it to 255example, if there is a hypothetical language server program
258the alist like this: 256@command{fools} for the language @code{Foo} which is supported by an
257Emacs major-mode @code{foo-mode}, you can add it to the alist like
258this:
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.
372Once Eglot is enabled in a buffer, it uses LSP and the language-server 372Once Eglot is enabled in a buffer, it uses LSP and the language-server
373capabilities to activate, enable, and enhance modern IDE features in 373capabilities to activate, enable, and enhance modern IDE features in
374Emacs. The features themselves are usually provided via other Emacs 374Emacs. The features themselves are usually provided via other Emacs
375packages. These are the main features that Eglot enables and provides: 375packages. Here's the list of the main features that Eglot enables and
376provides:
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
395capabilities which uses the language-server understanding of the 396capabilities which uses the language-server understanding of the
396program source. In particular, it eliminates the need to generate 397program source. In particular, it eliminates the need to generate
397tags tables (@pxref{Tags tables,,, emacs, GNU Emacs Manual}) for 398tags tables (@pxref{Tags tables,,, emacs, GNU Emacs Manual}) for
398languages that are only supported by the @code{etags} backend. 399languages which are only supported by the @code{etags} backend.
399 400
400@item 401@item
401Buffer navigation by name of function, class, method, etc., via Imenu 402Buffer navigation by name of function, class, method, etc., via Imenu
@@ -507,7 +508,7 @@ directory.
507 508
508@item 509@item
509A VC project: source files in a directory hierarchy under some VCS, 510A VC project: source files in a directory hierarchy under some VCS,
510e.g.@: a Git repository (@pxref{Version Control,,, emacs, GNU Emacs 511e.g.@: a VCS repository (@pxref{Version Control,,, emacs, GNU Emacs
511Manual}). 512Manual}).
512 513
513@item 514@item
@@ -620,9 +621,8 @@ will be added to those managed by an existing server session.
620The command attempts to figure out the buffer's major mode and the 621The command attempts to figure out the buffer's major mode and the
621suitable language server; in case it fails, it might prompt for the 622suitable language server; in case it fails, it might prompt for the
622major mode to use and for the server program to start. If invoked 623major mode to use and for the server program to start. If invoked
623with a prefix argument @kbd{C-u}, it always prompts for the server 624with @kbd{C-u}, it always prompts for the server program, and if
624program, and if invoked with @kbd{C-u C-u}, also prompt for the major 625invoked with @kbd{C-u C-u}, it also prompts for the major mode.
625mode.
626 626
627If the language server is successfully started and contacted, this 627If the language server is successfully started and contacted, this
628command arranges for any other buffers belonging to the same project 628command 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
640Shuts down an the current connection to the language server and 640This command shuts down the current connection to the language
641immediately restarts it using the same options used originally. This 641server and immediately restarts it using the same options used
642can sometimes be useful to unclog a partially malfunctioning server 642originally. This can sometimes be useful to unclog a partially
643connection. 643malfunctioning server connection.
644 644
645@item M-x eglot-shutdown 645@item M-x eglot-shutdown
646Shuts down a language server. This commands prompts for a language 646This command shuts down a language server. It prompts for a language
647server to shut down (unless there's only one server session, and it 647server to shut down (unless there's only one server session, and it
648manages the current buffer). Then the command shuts down the server 648manages the current buffer). Then the command shuts down the server
649and stops managing the buffers the server was used for. Emacs 649and stops managing the buffers the server was used for. Emacs