EGLOT-NEWS (19298B)
1 Eglot NEWS -*- outline -*- 2 3 Copyright (C) 2018-2023 Free Software Foundation, Inc. 4 See the end of the file for license conditions. 5 6 Please send Eglot bug reports to 'bug-gnu-emacs@gnu.org', and Cc (or 7 X-Debbugs-CC) the maintainer 'joaotavora@gmail.com' as well. Please 8 read the chapter titled "Troubleshooting" in the Eglot manual, 9 available https://joaotavora.github.io/eglot/#Troubleshooting-Eglot 10 11 This file is about changes in Eglot, the Emacs client for LSP 12 (Language Server Protocol) distributed with GNU Emacs since Emacs 13 version 29.1 and with GNU ELPA since 2018. 14 15 Note: references to some Eglot issues are presented as "github#nnnn". 16 This refers to https://github.com/joaotavora/eglot/issues/. That is, 17 to look up issue github#1234, go to 18 https://github.com/joaotavora/eglot/issues/1234. 19 20 21 * Changes in Eglot 1.15 (29/4/2023) 22 23 ** Fix LSP "languageId" detection 24 25 Many servers today support multiple languages, meaning they can handle 26 more than one file type in the same connection. This relies on the 27 client supplying a ':languageId' string. Previously, Eglot calculated 28 this string based on an imperfect heuristic and was often wrong. See 29 github#1206. 30 31 ** Fix problems with missing signature documentation (bug#62687) 32 33 ** Reworked 'eglot-imenu' 34 35 Eglot's Imenu backend (used for M-x imenu among other extensions), has 36 been reworked. Most newer servers respond to 37 'textDocument/documentSymbol' with a vector of 'DocumentSymbol', not 38 'SymbolInformation'. It's not worth it trying to make the two formats 39 resemble each other. This also lays groundwork supporting a 40 forthcoming "breadcrumb" feature of bug#58431. 41 42 ** New command 'eglot-update' 43 44 This allows users to easily update to the latest version of Eglot. 45 46 47 * Changes in Eglot 1.14 (3/4/2023) 48 49 ** Faster, more responsive completion 50 51 Eglot takes advantage of LSP's "isIncomplete" flag in responses to 52 completion requests to drive new completion-caching mechanism for the 53 duration of each completion session. Once a full set of completions 54 is obtained for a given position, the server needn't be contacted in 55 many scenarios, resulting in significantly less communication 56 overhead. This works with the popular Company package and stock 57 completion-at-point interfaces. 58 59 A variable 'eglot-cache-session-completions', t by default, controls 60 this. The mechanism was tested with ccls, jdtls, pylsp, golsp and 61 clangd. Notably, the C/C++ language server Clangd version 15 has a 62 bug in its "isIcomplete" flag (it is fixed in later versions). If you 63 run into problems, disable this mechanism like so: 64 65 (add-hook 'c-common-mode-hook 66 (lambda () (setq-local eglot-cache-session-completions nil))) 67 68 ** At-point documentation less obtrusive in echo area 69 70 Eglot takes advantage of new features of ElDoc to separate short 71 documentation strings from large ones, sending the former to be shown in 72 the ElDoc's echo area and the latter to be shown in other outlets, 73 such as the *eldoc* buffer obtainable with 'C-h .'. 74 75 ** New variable 'eglot-prefer-plaintext' 76 77 Customize this to t to opt-in to docstrings in plain text instead of 78 Markdown. 79 80 (bug#61373) 81 82 ** Progress indicators inhabit the mode-line by default 83 84 To switch to the echo area, customize 'eglot-report-progress' to 85 'messages'. To switch off progress reporting completely, set to nil. 86 87 ** Snippet support is easier to enable 88 89 The user needn't manually activate 'yas-minor-mode' or 90 'yas-global-mode'. If YASnippet is installed and the server supports 91 snippets, it is used automatically, unless the symbol 'yasnippet' has 92 been added to 'eglot-stay-out-of'. 93 94 95 * Changes in Eglot 1.13 (15/03/2023) 96 97 ** ELPA installations on Emacs 26.3 are supported again. 98 99 100 * Changes in Eglot 1.12 (13/03/2023) 101 102 ** LSP inlay hints are now supported. 103 Inlay hints are small text annotations not unlike diagnostics, but 104 designed to help readability instead of indicating problems. For 105 example, a C++ LSP server can serve hints about positional parameter 106 names in function calls and a variable's automatically deduced type. 107 Emacs can display these hints using overlays, helping the user 108 remember those types and parameter names. 109 110 ** Longstanding Tramp instability issues solved. 111 The solution involves a Tramp-specific workaround in Eglot. Future 112 Tramp versions will have this problem solved at the origin. The 113 workaround will then be removed. Emacs bug#61350 has more details. 114 115 (github#859, github#1020, github#883) 116 117 ** LSP's 'positionEncoding' capability is now supported. 118 The position-encoding scheme (UTF-8, UTF-16 or UTF-32) can now 119 be negotiated with the server. 120 121 ** More of the user's Eldoc configuration is respected. 122 This change addresses the problems reported in many Elglot reports 123 dating back to early 2021 at least. 124 125 (github#646, github#894, github#920, github#1031, github#1171). 126 127 This is unfinished work, as 'eldoc-documentation-strategy' is still 128 set by Eglot during its tenure over a buffer. The default value for 129 it cannot work reasonably with Eglot's additions to 130 'eldoc-documentation-functions'. 131 132 ** Completion labels are correctly displayed in servers like clangd. 133 134 (github#1141) 135 136 ** Assorted bugfixes. 137 138 (bug#61312, bug#61478, bug#61532, bug#61726, bug#61866, bug#61748) 139 140 141 * Changes in Eglot 1.11 (27/1/2023) 142 143 ** New server vscode-json-languageserver added to 'eglot-server-programs'. 144 145 (bug#60198) 146 147 ** Assorted bugfixes. 148 149 (bug#60379, bug#60557, (bug#61048) 150 151 152 * Changes in Eglot 1.10 (16/12/2022) 153 154 ** Emacs progress reporters are used for LSP progress notifications. 155 (bug#59149) 156 157 ** LSP reported URIs other than file:// are passed on to Emacs. 158 This change allows other URI handlers, such as a 'jar:' handling 159 package, to cooperate with Eglot and find files inside compressed file 160 systems (bug#58790). 161 162 ** Eglot now shows in the menu bar. 163 164 ** Tree-sitter modes added to 'eglot-server-programs'. 165 These modes are usually handled by the same server that handles the 166 "classical mode". 167 168 ** New servers chsharp-ls and texlab added to 'eglot-server-programs'. 169 170 ** Assorted bugfixes. 171 (bug#59824, bug#59338) 172 173 174 * Changes in Eglot 1.9 (8/10/2022) 175 176 This is the last release before integration into Emacs's core. 177 178 ** New 'M-x eglot-list-connections' command. 179 Probably not very useful for now. More keybindings and clickable 180 shortcuts to connection-specific commands to be added later. 181 182 ** Manual temporarily lives in separate MANUAL.md file. 183 The manual has been rewritten mostly from scratch. It is structured 184 hierarchically and is more complete. After the merge into Emacs, the 185 Eglot Texinfo manual bundled with Emacs used this temporary manual as 186 a starting point. 187 188 ** Support for "single server, multiple modes". 189 Previously, if an entry such as '((c++-mode c-mode) . ("clangd)")' was 190 found in 'eglot-server-programs', it meant that '.cpp' files '.c' 191 files would lead to two 'clangd' instances for managing them, even if 192 these files were in the same project. Now only one is created. It is 193 assumed that most, if not all, servers configured in 194 'eglot-server-programs' handle this correctly. 195 196 (github#681) 197 198 ** 'eglot-imenu' no longer uses problematic "special elements". 199 Though Eglot's 'eglot-imenu' returned a fully compliant 'imenu' 200 structure, that object was not understood by many other frontends 201 other than 'M-x imenu' itself. Since the special functionality it 202 enabled wasn't being used anyway, it was decided to remove it to fix 203 these longstanding problems. 204 205 (github#758, github#536, github#535) 206 207 ** 'eglot-workspace-configuration' has been overhauled. 208 This variable and its uses are now more thoroughly documented. It can 209 be set to a function for dynamic calculation of the configuration. 210 The preferred format is a plist, though the earlier alist format is 211 still supported. 212 213 (github#967, github#590, github#790) 214 215 ** 'C-u M-.' lists and completes arbitrary workspace symbols. 216 A very old request, now made possible by a relatively recent change to 217 the 'workspace/symbol' RPC method. 218 219 (github#131) 220 221 ** Reworked mode-line menus. 222 New menus help discover Eglot's features and show which of them are 223 supported by the current server. Menus can be customized away via 224 'eglot-menu-string', making space in mode-line. 225 226 (github#792) 227 228 ** Easier to use LSP 'initialize.initializationOptions'. 229 In 'eglot-server-programs' a plist may be appended to the usual list 230 of strings passed as command line arguments. The value of its 231 ':initializationOptions' key constructs the corresponding LSP JSON 232 object. This may be easier than creating a 'defclass' for a specific 233 server and specializing 'eglot-initialization-options' to that class. 234 235 (github#901, github#845, github#940) 236 237 ** LSP on-type formatting is now supported. 238 This is the 'documentOnTypeFormattingProvider' LSP capability, which 239 may be disabled via 'eglot-ignored-server-capabilities' 240 241 (github#899) 242 243 ** Basic LSP "workspace folders" support added. 244 Eglot now advertises 'project-root' and 'project-external-roots' as 245 workspace-folders. (Configuring 'project-vc-external-roots-function' 246 via Elisp or 'tags-table-list' via Custtomize are two ways to set the 247 external roots of a simple git project.) 248 249 (github#893) 250 251 ** Eglot can now show project wide diagnosics via Flymake. 252 Some LSP servers report diagnostics for all files in the current 253 workspace. Flymake has (as of version 1.2.1) the option to show 254 diagnostics from buffers other than the currently visited one. The 255 command 'M-x flymake-show-project-diagnostics' will now show all the 256 diagnostics relevant to a workspace. 257 258 (github#810) 259 260 ** Support LSP completion tags. 261 An LSP completion tag can be used to tell the editor how to render a 262 completion. Presently, one kind of tag exists, denoting its 263 corresponding completion as obsolete. 264 265 (github#797) 266 267 ** Support LSP optional diagnostic tags. 268 A diagnostic tag can indicate either "unused or unnecessary code" or 269 "deprecated or obsolete code". Following the rendering suggestions in 270 the protocol, we fade out unnecessary code and strike-through 271 deprecated code. 272 273 (github#794) 274 275 ** The Rust language server is now rust-analyzer by default. 276 Eglot will now prefer starting "rust-analyzer" to "rls" when it is 277 available. The special support code for RLS has been removed. 278 279 (github#803) 280 281 ** New servers have been added to 'eglot-server-programs'. 282 - clojure-lsp (github#813) 283 - racket-langserver (github#694) 284 - futhark lsp (github#922) 285 - purescript-language-server (github#905) 286 - Perl::LanguageServer (github#952) 287 - marksman (github#1013) 288 - jedi-language-server ([#994](github#994)) 289 290 291 * Changes in Eglot 1.8 (12/1/2022) 292 293 ** Alternate servers supported out-of-box for the same major mode. 294 In practice, this removes the need for Eglot to "officially" bless one 295 server over another. 296 297 Do not confuse this feature with another missing feature which 298 consists of supporting multiple servers simultaneously managing a 299 major mode within a project. 300 301 (github#688) 302 303 ** TRAMP support added. 304 There are no variables to customize: visit a remote file, ensure the 305 server also exists in the remote, and type "M-x eglot". 306 307 (github#637, github#463, github#84) 308 309 ** 'eglot-ignored-server-capabilities' is now correctly spelled. 310 This user-visible variable used to be spelled 311 'eglot-ignored-server-capabilites', which is still a valid but 312 obsolete name. 313 314 (github#724) 315 316 ** Eglot can manage cross-referenced files outside project. 317 This is activated by a new customization option 318 'eglot-extend-to-xref', which defaults to nil. 319 320 (github#76, github#686, github#695) 321 322 ** Code action shortcuts can be added by the user. 323 'M-x eglot-code-actions' accepts an optional 'action-kind' argument, 324 specified interactively with 'C-u'. Other shortcuts call specific 325 actions directly ('eglot-code-action-inline', 326 'eglot-code-action-extract', 'eglot-code-action-rewrite', 327 'eglot-code-action-organize-imports' and 328 'eglot-code-action-quickfix'). One can create one's own shortcuts for 329 code actions with specific a kind by calling 'eglot-code-actions' from 330 Lisp. 331 332 (github#411) 333 334 ** New command 'eglot-shutdown-all added. 335 This disconnects all the Eglot connections in the user's session. 336 337 (github#643) 338 339 ** New variable 'eglot-withhold-process-id' added. 340 If non-nil, Eglot will not send the Emacs process ID to the language 341 server. This can be useful when using docker to run a language 342 server. 343 344 (github#722) 345 346 ** Several new servers have been added to 'eglot-server-programs'. 347 - cmake-language-server (github#787) 348 - css-languageserver (github#204, github#769) 349 - fortls (github#603) 350 - html-languageserver (github#204, github#769) 351 - json-languageserver (github#204, github#769) 352 - lua-lsp (github#721) 353 - mint ls (github#750) 354 - pyright (github#742) 355 - vim-language-server (github#787) 356 - yaml-language-server (github#751) 357 - zls (github#646) 358 359 360 * Changes in Eglot 1.7 (16/12/2020) 361 362 ** Hierarchical symbols are supported in Imenu. 363 (github#303). 364 365 ** Multiple "documentation at point" sources are supported. 366 Such sources include as LSP's signature, hover and also the Flymake 367 diagnostic messages. They can all be presented in the echo area 368 (space permitting), or via 'C-h .'. For now, composition of different 369 sources can be customized using 'eldoc-documentation-strategy', 370 'eldoc-echo-area-use-multiline-p' and 'eldoc-prefer-doc-buffer'. 371 372 The variables 'eglot-put-doc-in-help-buffer' and 373 'eglot-auto-display-help-buffer' have been removed. 374 375 (github#439, github#494, github#481, github#454) 376 377 378 * Changes in Eglot 1.6 (16/04/2020) 379 380 ** Column offset calculation is now LSP-conformant. 381 It seems the majority of servers now comply with the language server 382 specification when it comes to handling non-ASCII texts. Therefore 383 the default values of 'eglot-move-to-column-function' and 384 'eglot-current-column-function' have been changed. Consult the 385 documentation of these variables for how to restore the old behavior. 386 387 (github#361) 388 389 ** LSP workspace/configuration requests are supported. 390 Also a new section "Per-project server configuration" in the README.md 391 should answer some FAQ's in this regard. 392 393 (github#326) 394 395 396 * Changes in Eglot 1.5 (20/10/2019) 397 398 ** Eglot takes over Company configuration. 399 Similar to what was already the case with Flymake, Eldoc and Xref, use 400 just the backend that can do something useful in Eglot, 401 'company-capf'. See 'eglot-stay-out-of' to opt out of this. 402 403 (github#324) 404 405 ** New option 'eglot-autoshutdown' added. 406 This disconnects the server after last managed buffer is killed. 407 408 (github#217, github#270) 409 410 ** Completion support has been fixed. 411 Among other things, consider LSP's "filterText" cookies, which enable 412 a kind of poor-man's flex-matching for some backends. 413 414 (github#235, github#313, github#311, github#279) 415 416 ** Supports LSP's "goto declaration/implementation/typeDefinition". 417 418 (github#302) 419 420 ** New option 'eglot-send-changes-idle-time' added. 421 422 (github#258) 423 424 ** Eglot's Eldoc no longer flickers when moving around. 425 426 (github#198) 427 428 ** Large docs shown in help buffer instead of echo area by default. 429 Also add two new customization variables 430 'eglot-put-doc-in-help-buffer' and 'eglot-auto-display-help-buffer'. 431 432 (github#198) 433 434 ** Built-in support for Go, Elixir and Ada added. 435 436 (github#304, github#264, github#316) 437 438 439 * Changes in Eglot 1.4 (5/1/2019) 440 441 ** Parameter highlighting in the first line of signature corrected. 442 443 ** Markdown documentation strings are rendered with faces. 444 Eglot uses 'gfm-view-mode' for this. 445 446 ** Hard dependencies on Flymake have been removed. 447 The user can turn Flymake off now in buffers managed by Eglot. 448 449 ** Connection hooks are run with proper directory local variables. 450 This fixes issues with suspiciously empty 'didChangeConfiguration' 451 messages that are supposed to communicate parameters from a 452 directory-set 'eglot-workspace-configuration'. 453 454 (github#196) 455 456 ** Completion sorting has been fixed. 457 If the server returns completions in some sensible order, Eglot will 458 keep it. 459 460 (github#190) 461 462 ** Flymake and Eldoc taken over completely while managing buffers. 463 No longer try to add Eglot's facilities to existing facilities in 464 these two domains. 465 466 467 * Changes in Eglot 1.3 (10/12/2018) 468 469 ** Provide strict checking of incoming LSP messagesp. 470 471 (github#144, github#156) 472 473 ** Add brief context after 'xref-find-references' when available. 474 475 (github#52) 476 477 ** Support 'completionContext' to help servers like 'ccls'. 478 479 ** Use Flymake from GNU ELPA. 480 481 (github#178) 482 483 484 * Changes in Eglot 1.2 (23/11/2018) 485 486 ** Support snippet completions. 487 Eglot uses 'yasnippet.el' for this, if it is installed. 488 489 (github#50) 490 491 ** 'workspace/didChangeConfiguration' implemented. 492 493 (github#29) 494 495 ** Handle experimental/unknown server methods gracefully. 496 497 (github#39) 498 499 ** Accept functions as entries in 'eglot-server-programs'. 500 'CONTACT' in the '(MAJOR-MODE . CONTACT)' association in 501 'eglot-server-programs' can now be a function of no arguments 502 producing any value previously valid for a contact. Functions can be 503 interactive or non-interactive. 504 505 (github#63) 506 507 ** Improve completion to be snappier and don't hinder typing. 508 509 (github#61) 510 511 ** Consider ':triggerCharacters' in company completion. 512 513 (github#80) 514 515 ** Add support for LSP 'TextEdit' objects in completion. 516 517 ** Prefer ccls over cquery for C/C++ 518 519 (github#94) 520 521 ** 'eglot-ignored-server-capabilites' is more user-friendly. 522 523 (github#126) 524 525 ** Supports asynchronous connections. 526 If a connection to the server is taking too long, is will continue in 527 the background. A new defcustom 'eglot-sync-connect' controls this 528 feature. 529 530 (github#68) 531 532 ** The 'eglot-shutdown' command prompts for the server to shutdown. 533 534 (github#73) 535 536 ** Add support for the Eclipse JDT language server. 537 538 (github#63) 539 540 ** Add out-of-the-box support for Haskell, Kotlin, Go, Ocaml, R. 541 542 ** Add the ability to move to LSP-precise columns. 543 Some servers like 'clangd' follow the UTF-16-based spec very closely 544 here. 545 546 (github#124) 547 548 ** Fix a potential security issue fontifying LSP doc. 549 550 (github#154) 551 552 ** Fix many, many bugs 553 554 (github#44, github#48, github#54, github#58, github#64, github#74, 555 github#81, github#82, github#86, github#87, github#83, github#93, 556 github#100, github#115, github#120, github#121, github#126, 557 github#138, github#144, github#158, github#160, github#167) 558 559 560 * Changes in Eglot 1.1 (9/7/2018) 561 562 ** Implement TCP autostart/autoconnect (and support Ruby's Solargraph). 563 The ':autoport' symbol in the server incovation is replaced 564 dynamically by a local port believed to be vacant, so that the ensuing 565 TCP connection finds a listening server. 566 567 ** Eglot now depends on Emacs library 'jsonrpc.el'. 568 569 570 ---------------------------------------------------------------------- 571 This file is part of GNU Emacs. 572 573 GNU Emacs is free software: you can redistribute it and/or modify 574 it under the terms of the GNU General Public License as published by 575 the Free Software Foundation, either version 3 of the License, or 576 (at your option) any later version. 577 578 GNU Emacs is distributed in the hope that it will be useful, 579 but WITHOUT ANY WARRANTY; without even the implied warranty of 580 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 581 GNU General Public License for more details. 582 583 You should have received a copy of the GNU General Public License 584 along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. 585 586 587 Local Variables: 588 bug-reference-bug-regexp: "\\(\\(github\\|bug\\)#\\([0-9]+\\)\\)" 589 bug-reference-url-format: eglot--debbugs-or-github-bug-uri 590 paragraph-separate: "[ ]" 591 End: 592