Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update eglot.el from Emacs's upstream lisp/progmodes/eglot.el
This brings in many changes: commit ba22a2c346b4a8cc992333037f6a30303a928a56 Author: João Távora <[email protected]> Date: Fri Mar 10 11:30:58 2023 +0000 Bump Eglot version to 1.12 * etc/EGLOT-NEWS: New file. * etc/NEWS: Briefly mention etc/EGLOT-NEWS. * lisp/progmodes/eglot.el: Bump versions. commit 4a603c98499e6ffc0ea4b061a2895b4f7f8cb1c3 Author: João Távora <[email protected]> Date: Sun Mar 12 19:30:53 2023 +0000 Amend last Eglot commit (bug#62065) The fix contained a spurious check for this-command that shouldn't have made it in.. * lisp/progmodes/eglot.el (eglot-ensure): Don't check this-command. commit b916ec88b2ffe22a49128f17cdfb78f0ab1bc713 Author: João Távora <[email protected]> Date: Sun Mar 12 18:19:40 2023 +0000 Make eglot-ensure's post-command-hook run a bit later (bug#62065) 'eglot-ensure', typically used in the major-mode-hook, use 'post-command-hook' to schedule an automated, non-interactive connection attempt to a server. The goal is to connect when the buffer is ready, i.e. after the user command that found the file. However, if there are dir-local or buffer-local variables to confirm, finding the file will cause a minibuffer prompt to appear. In that case, 'eglot-ensure's addition to the global post-command-hook runs before it was intended too and a connection is started prematurely. In turn, this means that a call to 'hack-dir-local-variables' -- which is part of the connection process -- which also needs a minibuffer prompt, collides with the previous one. This generates an error and confuses the user, who doesn't know if the directory-local variables have been applied or not. This commit fixes the clash by having 'eglot-ensure' set 'post-command-hook' buffer-locally. This causes the automated connection to take place, as intended, after the user's original file-finding command has ended. However, the problem reported in bug#62065 is not completely fixed. If the user answers "no" to the first "confirm local variables" "prompt, she will be prompted again in the second one. A subsequent commit will address this separate problem. * lisp/progmodes/eglot.el (eglot-ensure): Use buffer-local post-command-hook. commit 01b65d442ad681e6fef0db76451e668125a17038 Author: João Távora <[email protected]> Date: Thu Mar 9 13:07:02 2023 +0000 Autoload Eglot helper funtion eglot--debbugs-or-github-bug-uri This isn't a typical autoload: the progn block is plced in the autoloads file, but the eglot.el file itself isn't loaded as a result when the function inside the progn block is called. * lisp/progmodes/eglot.el (eglot--debbugs-or-github-bug-uri): autoload, but in progn. commit 6c66dbd02c7773a4347583b35b8caa219df30807 Author: João Távora <[email protected]> Date: Sat Mar 4 15:05:15 2023 +0000 Turn on Eglot inlay hints by default This is like any other server-provided feature, and may be turned off client-side by setting eglot-ignored-server-capabilities like (add-to-list 'eglot-ignored-server-capabilities :inlayHintProvider) * lisp/progmodes/eglot.el (eglot--maybe-activate-editing-mode): Activate eglot-inlay-hints-mode. (eglot-inlay-hints-mode): Instead of warning about missing :inlayHintProvider, turn off eglot-inlay-hints-mode. commit 0bfba49ca7cf90e841c076d6db9bb3826e7b6a57 Author: João Távora <[email protected]> Date: Sat Mar 4 12:49:00 2023 +0000 Robustify Eglot for "transient" projects When Eglot needs to synthesize a "transient" project for default-directory sometimes the value of that variable is set to an unexpanded value, sometimes not. This can cause simple invocations like. Emacs -Q ~/path/to-some-python-file.py -f eglot to fail, because eglot--current-server will be looking for a project in the registry called (transient . "~/path") where in reality it is stored there as (transient . "/home/someuser/path") The fix is to always expand default-directory in eglot--current-project. * lisp/progmodes/eglot.el (eglot--current-project): Use expand-file-name. commit bd5115e13479b1d81d6aa09efe362ad14d53c3c6 Author: João Távora <[email protected]> Date: Sat Mar 4 00:09:32 2023 +0000 Remove Eglot activation check from find-file-hook Adding eglot--maybe-activate-editing-mode to find-file-hook isn't really necessary, since it is already in 'after-change-major-mode-hook', and that also runs every time we find a file. This reduces the number of project.el logic that runs every time the user visits a file. * lisp/progmodes/eglot.el (find-file-hook): No need to add eglot--maybe-activate-editing-mode here. commit 3a651773d29afb48ac4229cd19e532bd57a4ee2d Author: João Távora <[email protected]> Date: Fri Mar 3 13:13:35 2023 +0000 Eglot: pay better attention to hints' paddingLeft/Right (bug#61924) * lisp/progmodes/eglot.el (eglot--update-hints-1): Consider :json-false, which is a non-nil value. commit 67befc1f5a5492fee5fb3891083df77831ec830e Author: João Távora <[email protected]> Date: Thu Mar 2 13:27:14 2023 +0000 Eglot: use shell-file-name in eglot--cmd (bug#61748) * lisp/progmodes/eglot.el (eglot--cmd): Use shell-file-name. commit 0a4b1c0102d4062d24e19340f863b9df25e07ab3 Author: João Távora <[email protected]> Date: Wed Mar 1 13:24:07 2023 +0000 ; Eglot: improve bug-reference-url-format/bug-reference-url-regexp * lisp/progmodes/eglot.el (eglot--debbugs-or-github-bug-uri): New helper. commit 40c9fc8e3b3f55c9122b95e21660b5709109bd1a Author: João Távora <[email protected]> Date: Wed Mar 1 11:12:51 2023 +0000 Eglot: work around Tramp instability bug#61350 Unconditionally disable ControlMaster for the Eglot's Tramp connection. * lisp/progmodes/eglot.el (tramp-ssh-controlmaster-options) (use-tramp-ssh-controlmaster-options): Forward declare (eglot--connect): Set variables to unconditionally disable ControlMaster. commit 97a83ff31fa9e3e2455d3168a789649dcd20a635 Author: João Távora <[email protected]> Date: Wed Mar 1 01:22:15 2023 +0000 Eglot: fix M-x eglot-show-workspace-configuration (bug#61866) Now consult .dir-locals.el every time the workspace configuration is needed: - workspace/configuration server request - workspace/didChangeConfiguration signal - M-x eglot-show-workspace-configuration The major-mode/hack-dir-local-variables-non-file-buffer trick is used. When there is more than one, the server connection's "main" major mode is used to find the relevant .dir-locals.el section. * lisp/progmodes/eglot.el (eglot--lookup-mode): Fix docstring. (eglot--connect): Simplify. (eglot-show-workspace-configuration): Fix. (eglot--workspace-configuration): Remove. (eglot--workspace-configuration-plist): Rework. (eglot-handle-request): Simplify. commit f601e9666d8b861712c09025711dc3a4261cb0ea Author: João Távora <[email protected]> Date: Mon Feb 27 14:54:53 2023 +0000 Eglot: support multiple labels in same inlay hint Mainly the rust-analyzer LSP server uses this. There are still more things we could support, like tooltips and stuff. * lisp/progmodes/eglot.el (lsp-interface-alist): Add InlayHintLabelPart. (eglot--update-hints-1): Support multiple labels for same hint. commit 4a5eda7ed2ae7567d0d54871cc51e0c2c27d73a9 Author: João Távora <[email protected]> Date: Mon Feb 27 14:23:35 2023 +0000 Eglot: don't paint hints outside requested region (bug#61812) * lisp/progmodes/eglot.el (eglot--lambda): Add cl-block. (eglot--update-hints-1): Return early if hint is outside the requested inlay hint range. commit 3d0a6c9baa613d69d75c3b2644e033a21da5f096 Author: João Távora <[email protected]> Date: Mon Feb 27 11:29:32 2023 +0000 Eglot: protect against unintended field text motion (bug#61726) Suggested-by: Augusto Stoffel <[email protected]> * lisp/progmodes/eglot.el (eglot--bol): New helper. (eglot-utf-8-linepos, eglot-utf-16-linepos) (eglot-utf-32-linepos, eglot-move-to-utf-8-linepos) (eglot-move-to-utf-16-linepos, eglot-move-to-utf-32-linepos) (eglot-handle-notification, eglot--xref-make-match) (eglot-completion-at-point): Use it. commit 647e40f4a0cf2c653d6ff6fc32116cbd2104d6ff Author: João Távora <[email protected]> Date: Mon Feb 27 11:04:44 2023 +0000 ; And yet another fix to eglot-current-linepos-function's docstring bug#61726 * lisp/progmodes/eglot.el (eglot-current-linepos-function): Another fix. commit 7c552be89da02270993f0866035abedb8c44f890 Author: Eli Zaretskii <[email protected]> Date: Sun Feb 26 16:48:07 2023 +0200 ; Another doc fix in eglot.el * lisp/progmodes/eglot.el (eglot-current-linepos-function): Another doc fix. commit 75c65fcc98ef5bda8fe91aeb8ba25c03e3182b8e Author: João Távora <[email protected]> Date: Sun Feb 26 14:05:07 2023 +0000 ; Fix last change bug#61726 * lisp/progmodes/eglot.el (eglot-current-linepos-function): Fix docstring. commit a3d15c1f74988b488fc4f924b303f8de620645a9 Author: Eli Zaretskii <[email protected]> Date: Sun Feb 26 15:24:11 2023 +0200 ; Fix last change * lisp/progmodes/eglot.el (eglot-current-linepos-function) (eglot-utf-8-linepos, eglot-utf-16-linepos) (eglot-utf-32-linepos, eglot-move-to-linepos-function) (eglot-move-to-utf-8-linepos, eglot-move-to-utf-32-linepos): Doc fixes. (Bug#61726) commit ca79b138d424766e3bfe8e4ca5d2b315b9ea4408 Author: João Távora <[email protected]> Date: Sun Feb 26 12:50:42 2023 +0000 Eglot: rename and redocument encoding-related functions (bug#61726) * lisp/progmodes/eglot.el (eglot-current-column): Obsolete. (eglot-lsp-abiding-column): Obsolete. (eglot-current-column-function): Obsolete. (eglot-current-linepos-function): Rename from eglot-current-column-function. (eglot-utf-8-linepos): Rename from eglot-bytewise-column. (eglot-utf-16-linepos): Rename from eglot-lsp-abiding-column. (eglot-utf-32-linepos): Rename from eglot-current-column. (eglot-move-to-current-column): Obsolete. (eglot-move-to-lsp-abiding-column): Obsolete. (eglot-move-to-column-function): Obsolete. (eglot-move-to-linepos-function): Rename from eglot-move-to-column-function. (eglot-move-to-utf-8-linepos): Rename from eglot-move-to-bytewise-column. (eglot-move-to-utf-16-linepos): Rename from eglot-move-to-lsp-abiding-column. (eglot-move-to-utf-32-linepos): Rename from eglot-move-to-current-column. (eglot--managed-mode): Adjust. (eglot-client-capabilities): Trim whitespace. * test/lisp/progmodes/eglot-tests.el (eglot-test-lsp-abiding-column) (eglot-test-lsp-abiding-column-1): Use new function/variable names. commit 3e3e6d71be76b80beca946f9dd433d12aa450695 Author: Augusto Stoffel <[email protected]> Date: Sun Feb 26 11:47:32 2023 +0000 Eglot: support positionEncoding LSP capability (bug#61726) * lisp/progmodes/eglot.el(eglot-client-capabilities): Announce the new capability. (eglot-bytewise-column, eglot-move-to-bytewise-column): New functions. (eglot--managed-mode): Set 'eglot-current-column-function' and 'eglot-move-to-bytewise-column' appropriately. commit b0e87e930e86d2e48659aed9cf85099c1fd2795c Author: Eli Zaretskii <[email protected]> Date: Sun Feb 26 10:27:18 2023 +0000 Eglot: use faster strategy for moving to LSP positions (bug#61726) Turns out we don't need encode-coding-region after all. * lisp/progmodes/eglot.el (eglot-move-to-lsp-abiding-column): Rewrite. Co-authored-by: Augusto Stoffel <[email protected]> commit 55d29c9bacb6227bc8b3a6c0dd52c7085fe63aaf Author: João Távora <[email protected]> Date: Fri Feb 24 14:48:01 2023 +0000 Eglot: fix jit-lock inlay hint bugs One of the bugs was straightforward. The timer function of eglot--update-hints must set the correct buffer. The other is much more odd. When using Eglot on Emacs's own src/coding.c, the jit-lock code starts calling its jit-functions over and over again with the same sequence of arguments, like so: ====================================================================== 1 -> (eglot--update-hints 63551 65051) 1 <- eglot--update-hints: [nil 25592 52026 4 ====================================================================== 1 -> (eglot--update-hints 65051 66551) 1 <- eglot--update-hints: [nil 25592 52026 4 ====================================================================== 1 -> (eglot--update-hints-1 63551 66551) 1 <- eglot--update-hints-1: nil ====================================================================== 1 -> (eglot--update-hints 63551 65051) 1 <- eglot--update-hints: [nil 25592 52026 4 ====================================================================== 1 -> (eglot--update-hints 65051 66551) 1 <- eglot--update-hints: [nil 25592 52026 5 ====================================================================== 1 -> (eglot--update-hints-1 63551 66551) 1 <- eglot--update-hints-1: nil This continues forever at a very fast rate and saturates the LSP channel. At first I thought that it was because eglot--update-hints-1 is actually causing the buffer to be modified with overlays sometime in the future, but it is not so! It seems that merely calling (goto-char (eglot--lsp-position-to-point position)) (from the LSP request handler in eglot--update-hints-1) will cause this bug. * lisp/progmodes/eglot.el (eglot--update-hints): Fix bugs. commit 5db75ec7d30d5cf5dc610382ca25bd5a5c4f8fb6 Author: João Távora <[email protected]> Date: Fri Feb 24 10:46:20 2023 +0000 Eglot: fix inlay hint with label collection instead of string Reported by Chinmay Dalal <[email protected]> * lisp/progmodes/eglot.el (eglot--update-hints-1): Fix bug when inlay hint contains collection of labels. commit b0cbd5590b238fa9001e3f07b7035704ef976722 Author: João Távora <[email protected]> Date: Thu Feb 23 23:51:09 2023 +0000 Eglot: simplify inlay hints implementation with jit-lock This implementation is much simpler than the one based on windows-scroll-functions. It's also supposedly safer, as long as jit-lock guarantees refontification of affected regions. It's not _trivially_ simple though, as simply adding 'eglot--update-hints-1' to jit-lock-functions, while possible, is going to request inlay hints from the LSP server for many small regions of the buffer, depending on what jit-lock thinks is best. So we keep coalescing these into a larger region until the time is suitable for a more bandwidth-efficient request. To do this, we use a jit-lock implementation detail, jit-lock-context-unfontify-pos, which is a proxy for knowing that the jit-lock-context-timer has run. Not sure how brittle it is, but it seems to work reasonably. We also get rid of the previous "get hints for entire buffer" implementation. * doc/misc/eglot.texi (Eglot Variables): Remove mention to deleted eglot-lazy-inlay-hints. * lisp/progmodes/eglot.el (eglot-lazy-inlay-hints) (eglot--inlay-hints-after-scroll) (eglot--inlay-hints-fully) (eglot--inlay-hints-lazily): Remove. (eglot--update-hints): Add function. (eglot-inlay-hints-mode): Simplify. commit 91e24c5b5a69495bcd706a5287c05bb5fd282700 Author: João Távora <[email protected]> Date: Thu Feb 23 19:18:41 2023 +0000 Eglot: update inlay hints on window configuration changes * lisp/progmodes/eglot.el (eglot--inlay-hints-after-window-config-change): New helper. (eglot-inlay-hints-mode): Use it. commit 5c2be6a2632052b39b49899d1b19df2942ac6453 Author: Eli Zaretskii <[email protected]> Date: Thu Feb 23 17:18:28 2023 +0200 ; Fix recently-added doc strings in eglot.el * lisp/progmodes/eglot.el (eglot-lazy-inlay-hints) (eglot-inlay-hints-mode): Doc fixes. commit e3be0dbf85c729447776d361ba56ada6b92f0149 Author: João Távora <[email protected]> Date: Thu Feb 23 13:58:38 2023 +0000 Eglot: display completion label when safe Originally reported in https://github.com/joaotavora/eglot/discussions/1141 by "Mintsoup". Eglot doesn't always show the LSP :label property of a CompletionItem in the completion candidates. That is because label is sometimes not what should be inserted in the buffer in the end, the :insertText property supercedes it. But the label is usually more suitable for display nevertheless and if the LSP CompletionItem contains either a snippet or a textEdit, it's safe to display the label, since :exit-function will guarantee that a suitable buffer insertion is performed. This change reflects that awareness that when a textEdit is available, it's acceptable to show the label. * lisp/progmodes/eglot.el (eglot-completion-at-point): Adjust. commit 1841299a11dfcd875bdbdb75d1fc56d996a727f7 Author: João Távora <[email protected]> Date: Tue Feb 21 14:14:05 2023 +0000 Eglot: implement inlay hints (bug#61412, bug#61066) Inlay hints are small text annotations to specific parts of the whole buffer, not unlike diagnostics, but designed to help readability instead of indicating problems. For example, a C++ LSP server can serve hints about positional parameter names in function calls and a variable's automatically deduced type. Emacs can display these hints in many little 0-length overlays with an 'before-string property, thus helping the user remember those types and parameter names. Since inlay hints are potentially a large amount of data to request from the LSP server, the implementation strives to be as parsimonious as possible with these requests. So, by default, inlay hints are only requested for the visible portions of the buffer across windows showing this buffer. This is done by leveraging the 'window-scroll-functions' variable, making for a reasonably complex implementation involving per-window timers. When scrolling a window, it may take a short amount of time for inlay hints to "pop in". The new user variable 'eglot-lazy-inlay-hints' can be used to exert some control over this. Specifically, if the variable's value is set to 'nil', then inlay hints are greedily fetched for the whole buffer every time a change occurs. This is a much simpler mode of operation which may avoid problems, but is also likely much slower in large buffers. Also, because the inlay feature is probably visually suprising to some, it is turned OFF by default, which is not the usual practice of Eglot (at least not when the necessary infrastructure is present). This decision may be changed soon. Here's a good one-liner for enabling it by default in every Eglot-managed buffer: (add-hook 'eglot-managed-mode-hook #'eglot-inlay-hints-mode) I haven't tested inlay hints extensively across many LSP servers, so I would appreciate any testing, both for functional edge cases and regarding performance. There are possibly more optimization oportunities in the "lazy" mode of operation, like more aggressively deleting buffer overlays that are not in visible parts of the buffer. Though I ended up writing this one from scratch, I want to thank Dimitry Bolopopsky <[email protected]> and Chinmay Dala <[email protected]> for suggestions and early patches. * lisp/progmodes/eglot.el (eglot--lsp-interface-alist): Define InlayHint. (eglot-client-capabilities): Announce 'inlayHint' capability. (eglot-ignored-server-capabilities): Add :inlayHintProvider. (eglot--document-changed-hook): New helper hook. (eglot--after-change): Use it. (eglot-inlay-hint-face, eglot-type-hint-face) (eglot-parameter-hint-face): New faces. (eglot--update-hints-1, eglot--inlay-hints-after-scroll) (eglot--inlay-hints-fully, eglot--inlay-hints-lazily): New helpers. (eglot-lazy-inlay-hints): New user variable. (eglot-inlay-hints-mode): New minor mode. (eglot--maybe-activate-editing-mode): Try to activate eglot-inlay-hints-mode. (eglot--before-change): Remove overlays immediately in the area being changed. (eglot--managed-mode-off): Remove overlays. * doc/misc/eglot.texi (Eglot Features): Mention inlay hints. (Eglot Variables): Mention eglot-lazy-inlay-hints. commit 28ed0d1840f94ba52b8b60bfbf222493fee2a3ea Author: João Távora <[email protected]> Date: Wed Feb 22 18:44:39 2023 +0000 Eglot: run eglot-managed-mode-hook after LSP didOpen This allows using the hook for interacting with the LSP server using the current buffer as the subject of that interaction ("document" in LSP parlance). * lisp/progmodes/eglot.el (eglot--maybe-activate-editing-mode): Run eglot-managed-mode-hook here. (eglot--managed-mode): Not here. commit 7ad5d9babed68ddb8cc4bdf7571fdf10e44e1bae Author: João Távora <[email protected]> Date: Wed Feb 22 18:50:46 2023 +0000 Eglot: restore eldoc-documentation-functions on shutdown * lisp/progmodes/eglot.el (eglot--managed-mode): Restore eldoc-documentation-functions when shutting down eglot. commit 711a775ba761e2838a6f73bf4b3119f0fe412841 Author: João Távora <[email protected]> Date: Tue Feb 21 13:59:04 2023 +0000 Eglot: simplify capability-checking code * lisp/progmodes/eglot.el (eglot--server-capable-or-lose): New helper. (eglot--signal-textDocument/willSave) (eglot--signal-textDocument/didSave): Tweak docstring. (eglot--workspace-symbols, xref-backend-identifier-at-point) (eglot-format, eglot-completion-at-point, eglot-rename) (eglot-code-actions): Use new eglot--server-capable-or-lose. commit ea7251ad6dfe3cfbdcea221a67c7b7d4fcbfebfa Author: João Távora <[email protected]> Date: Wed Feb 22 18:05:00 2023 +0000 Eglot: go back to setting eldoc-documentation-strategy again This commits reverts part of commit e83c78b8c7784254c2c6f043530ab325c2fa7f16 Author: João Távora <[email protected]> Date: Mon Feb 20 22:43:50 2023 +0000 Eglot: respect user's Eldoc configuration by default In that commit, I did what many longstanding issues and users were suggesting and removed Eglot's override of two Eldoc user configuration varibles. I verified that Eglot's behaviour would stay mostly unaltered but my tests were very incomplete. In short there is no way that Eglot can work acceptably with the default setting of 'eldoc-documentation-strategy', which is 'eldoc-documentation-default'. So it must be changed, either globally or locally in Eglot's minor mode. This is true for any situation where both synchronous and asynchronous documentation sources are present. In Eglot's case there are two asynchronous sources which have more importance than the synchronous source. So any other strategy except the 'eldoc-documentation-default' makes sense. * lisp/progmodes/eglot.el (eglot--managed-mode): Set eldoc-documentation-strategy to eldoc-documentation-compose. commit e83c78b8c7784254c2c6f043530ab325c2fa7f16 Author: João Távora <[email protected]> Date: Mon Feb 20 22:43:50 2023 +0000 Eglot: respect user's Eldoc configuration by default This change addresses the problems reported in many Elglot reports dating back to early 2021 at least: https://github.com/joaotavora/eglot/issues/648 https://github.com/joaotavora/eglot/issues/894 https://github.com/joaotavora/eglot/issues/920 https://github.com/joaotavora/eglot/issues/1031 https://github.com/joaotavora/eglot/issues/1171 In one form or another, the reports point out that the multiple pieces of information about the "thing at point" made available by the LSP server are not all being considered by the ElDoc system. The reason for this is Eglot setting/trampling the variables 'eldoc-documentation-strategy' and 'eldoc-documentation-functions' in its minor more entry function. The reason it did that is historical and is partially described in the issues above. But, evidently, it never made much sense, because so many people want to override it, which requires setting 'eldoc-documentation-strategy' to the non-default value 'eldoc-documentation-compose'. The problem was made worse by the fact that setting it as usual in either the Customize menu or their init file didn't work, requiring a fairly complex Elisp snippet. That is now solved as of this commit. If the user does not do any setting, then Eglot works basically the same as before (i.e. shows only one piece of information). It is arguable that the default value for 'eldoc-documentation-strategy' should change globally to 'eldoc-documentation-compose', but that has other subtle implications and is not part of this commit. * lisp/progmodes/eglot.el (eglot--managed-mode): Don't set Eldoc variables greedily. commit 893ddd5903e1b0345f22b124e5d6fe8fc89ef6af Author: Theodor Thornhill <[email protected]> Date: Sun Feb 19 11:11:13 2023 +0000 Eglot: improve treatment of completion items without :sortText (bug#61532) Previously, defaulting to the empty string put candidates without :sortText to the top of the list. since string-lessp is safe with nil arguments, this makes them sort to the end instead. * lisp/progmodes/eglot.el (eglot-completion-at-point): Simplify. commit 7678b7e46f2e394447f39c3a6cf02bc285e5a5a4 Author: ~kby <[email protected]> Date: Tue Feb 14 23:25:05 2023 +0000 Eglot: check server capability before sending didSave (bug#61478) * lisp/progmodes/eglot.el (eglot--signal-textDocument/didSave): check server capability. Copyright-paperwork-exempt: Yes commit b04cce02ff41a2ecb850e9772ab8d415cc6c8b50 Author: Eli Zaretskii <[email protected]> Date: Thu Feb 9 12:17:18 2023 +0200 Fix Scala entry in Eglot's DB of LSP servers * lisp/progmodes/eglot.el (eglot-server-programs): Support Scala LSP named "metals", in addition to "metals-emacs". (Bug#61312) commit 2ac8c4bbd6f47751a68b0230310f6fddd7da8de5 Author: Dmitry Gutov <[email protected]> Date: Tue Feb 7 00:28:25 2023 +0200 (eglot-completion-at-point): Return correct values in :company-kind * lisp/progmodes/eglot.el (eglot-completion-at-point): Return the correct values in :company-kind for "EnumMember" and "TypeParameter". The convention is to use kebab case rather than plain downcasing. Reported in https://github.com/company-mode/company-mode/issues/1370. commit f72a394716f4373dbbdc79ad0816da90bdb032a1 Author: Basil L. Contovounesios <[email protected]> Date: Fri Jan 27 00:27:26 2023 +0000 Work around package.el transitive dependency bug Eglot already depends transitively on Xref 1.4.0 via Project, but package.el doesn't pick up on this in Emacs 28 (which has Xref 1.3.0). * lisp/progmodes/eglot.el (Version): Bump to 1.11. (Package-Requires): Explicitly require Xref 1.4.0, which is the version already required by Project, for the benefit of Emacs 28 (bug#61048). commit f367ba3ed03526356448a94addbb8554ece2f482 Author: Eli Zaretskii <[email protected]> Date: Mon Jan 16 16:52:48 2023 +0200 ; Avoid byte-compiler warning in eglot.el * lisp/progmodes/eglot.el (eglot): Rename INTERACTIVE to avoid byte-compiler warning. Update the doc string. (Bug#60557) commit 1b458aced723dc752a699e509816b92399087775 Author: Eli Zaretskii <[email protected]> Date: Mon Jan 16 16:08:46 2023 +0200 ; * lisp/progmodes/eglot.el: Remove stray space. commit 67df34c143d1adbf6d2817abb5da5dcad06369bb Author: João Távora <[email protected]> Date: Mon Jan 16 11:48:09 2023 +0000 Fix M-x eglot prompt when connection already exists (bug#60557) Before this change, if a current connection existed at the time of M-x eglot, user would be first asked to enter into M-x eglot's interactive spec details about new command line arguments, and only afterwards be prompted about what to do with the current connection (which could be to reconnect to it using the same arguments, or tear it down and make a new one). This is very confusing, as users may not be fully aware of the distinction between "reconnect" vs "disconnect-and-connect". They might not know if any new command line arguments provided are taking effect or not. This change simplifies this and removes the option to "reconnect instead" from M-x eglot (users can do that at any time via M-x eglot-reconnect). It also ensures that users are informed about a current connection before asking to enter new command line arguments and not the other way round. * lisp/progmodes/eglot.el (eglot): Rework. commit f1032bf24e79cf32341473c5d9f447c4c74f9d2b Author: Eshel Yaron <[email protected]> Date: Sat Jan 14 10:12:11 2023 +0200 Eglot: don't use "nil" as minibuffer initial input Doing M-x eglot in a buffer for which buffer-file-name is nil, prompts the user for a major mode to manage by invoking completing-read. The way completing-read was called would end up with the string "nil" as the initial minibuffer input, which is not very useful nor is it a valid input. * lisp/progmodes/eglot.el (eglot--guess-contact): Tweak prompt for major mode. (Bug#60379) Copyright-paperwork-exempt: yes commit 0562006da3b6f0147069a9aea75c08a9a0a4e6d8 Author: Perry Smith <[email protected]> Date: Mon Jan 2 02:57:38 2023 +0200 Add ruby-ts-mode * etc/NEWS: Mention the new mode. * lisp/progmodes/ruby-ts-mode.el: New file. * test/lisp/progmodes/ruby-ts-mode-tests.el: New file. * lisp/progmodes/eglot.el (eglot-server-programs): Add ruby-ts-mode to the Ruby entry. Co-authored-by: Dmitry Gutov <[email protected]> commit cae528457cb862dc886a34240c9d4c73035b6659 Author: Eli Zaretskii <[email protected]> Date: Sun Jan 1 05:31:12 2023 -0500 ; Add 2023 to copyright years. commit 014232d3840e9d7249fe28636935b7166b85e675 Author: João Távora <[email protected]> Date: Thu Dec 22 15:44:11 2022 +0000 Eglot: eglot--servers-by-xrefed-file doesn't need to be value-weak * lisp/progmodes/eglot.el (eglot--servers-by-xrefed-file): Doesn't need to be weak. commit bbe35c280c2bf9fb2fd9b6e33b2950b8fae67e2c Author: João Távora <[email protected]> Date: Thu Dec 22 11:29:49 2022 +0000 Prevent stale servers when using eglot-extend-to-xref A weak-valued hash-table is not enough to guarantee that a reference to a zombie server in eglot--servers-by-xrefed-file variable won't survive long enough to confuse the next call to eglot--current-server in some buffers. So, before this fix it was common to get "Process EGLOT ... not running" errors if some xref-extended buffers (like system libraries) were open and M-x eglot-reconnect was issued. This should be prevented now. Note however, that even after this the eglot-extend-to-xref logic is still flawed. For example, if a buffer for the xref-extended buffer happens to be already visited by the time M-. is issued to navigate to it, Eglot won't be activated. A half-decent workaround is to kill the buffer and re-visit it. * lisp/progmodes/eglot.el (eglot--servers-by-xrefed-file): Move up. (eglot--on-shutdown): Make sure to cleanup eglot--servers-by-xrefed-file. commit d03ea8937803c6714df71dd148c79ca893d159e9 Author: Brian Leung <[email protected]> Date: Mon Dec 19 15:03:06 2022 -0800 eglot.el: Add vscode-json-languageserver to eglot-server-programs * lisp/progmodes/eglot.el (eglot-server-programs): Add the alternative name of the vcscode JSON server. (Bug#60198) commit cb8ccdd26702606710258e2e08bd1fc35bbc1674 Author: Randy Taylor <[email protected]> Date: Fri Dec 16 16:05:29 2022 -0500 Add rust-ts-mode (Bug#60136) * etc/NEWS: Mention it. * lisp/progmodes/eglot.el (eglot-server-programs): Add it. * lisp/progmodes/rust-ts-mode.el: New major mode with tree-sitter support. commit 4f9bccef556d57590444e384b16d94c81e5323c9 Author: Randy Taylor <[email protected]> Date: Tue Dec 13 09:41:01 2022 -0500 Add yaml-ts-mode (Bug#60105) * admin/notes/tree-sitter/build-module/batch.sh: * admin/notes/tree-sitter/build-module/build.sh: Add yaml support. * etc/NEWS: Mention it. * lisp/textmodes/yaml-ts-mode.el: New major mode with tree-sitter support. * lisp/progmodes/eglot.el (eglot-server-programs): Add it. commit 7575c85efd27f3a4e8e968d0bef1c63d6a2b8d84 Author: João Távora <[email protected]> Date: Fri Dec 16 09:23:21 2022 +0000 Bump Eglot version to 1.10 * lisp/progmodes/eglot.el (Version): Bump to 1.10 (Package-Requires): Bump required versions of jsonrpc and project. commit a0806bc7ea916bff49ecb452716c01d42307aec9 Author: João Távora <[email protected]> Date: Fri Dec 16 09:29:32 2022 +0000 Eglot: fix discrepant eglot-guess-contact/eglot-command-history Due to a typo, the defvar eglot--command-history wasn't actually used in eglot-guess-contact as intended. That function used a single-dash-name version of the variable instead. This worked fine, except that two variables were created instead of one, and the one actually being used didn't have any docstring. Rename the variable to eglot-command-history to fix this. It's better than renaming the reference in eglot-guess-contact which would lose user's history for M-x eglot. * lisp/progmodes/eglot.el (eglot-command-history): Rename from eglot--command-history. commit 546aed35434fb2cd4082dc2cee93236b9b62a60c Author: Jostein Kjønigsen <[email protected]> Date: Thu Dec 15 13:44:39 2022 +0100 eglot: Add support for new language server csharp-ls C# has two popular language servers: Omnisharp Roslyn (already supported) and csharp-ls (newer, more performant). * lisp/progmodes/eglot.el: Add new C# language server csharp-ls. (Bug#60089) commit fee2efe1b035d601ac53a32801227402e9be8bca Author: Randy Taylor <[email protected]> Date: Sun Dec 11 18:41:16 2022 -0500 Add go-ts-mode and go-mod-ts-mode (Bug#60025) * admin/notes/tree-sitter/build-module/batch.sh: * admin/notes/tree-sitter/build-module/build.sh: Add go-mod support. * etc/NEWS: Mention them. * lisp/progmodes/eglot.el (eglot-server-programs): Add them. * lisp/progmodes/go-ts-mode.el: New major modes with tree-sitter support. commit ca67d988d8721e9ec24a040b977393136457873f Author: Randy Taylor <[email protected]> Date: Sat Dec 10 21:40:25 2022 -0500 Add cmake-ts-mode * admin/notes/tree-sitter/build-module/batch.sh: * admin/notes/tree-sitter/build-module/build.sh: Add cmake support. * etc/NEWS: Mention it. * lisp/progmodes/cmake-ts-mode.el: New major mode with tree-sitter support. * lisp/progmodes/eglot.el (eglot-server-programs): Add it. commit d3669cfe156f43ca17b5d804fc9fd7fa1f8b0e26 Author: João Távora <[email protected]> Date: Sun Dec 11 23:16:58 2022 +0000 Eglot: allow skipping compile-time warnings about LSP interfaces * lisp/progmodes/eglot.el (eglot-strict-mode): Add 'no-unknown-interfaces'. (eglot--check-object): Honour new eglot-strict-mode value. commit 8f49137c9bf614b285c19a3a845c7606fcba23a4 Author: Randy Taylor <[email protected]> Date: Wed Dec 7 20:53:35 2022 -0500 Add dockerfile-ts-mode (Bug#59894) * admin/notes/tree-sitter/build-module/batch.sh: Add dockerfile support. * admin/notes/tree-sitter/build-module/build.sh: Support different namespaces and add dockerfile support. * etc/NEWS: Mention it. * lisp/progmodes/dockerfile-ts-mode.el: New major mode with tree-sitter support. * lisp/progmodes/eglot.el (eglot-server-programs): Add it. commit 74a009dd96a643b12a63a29fba3d40a74e7d82a2 Author: dannyfreeman <[email protected]> Date: Fri Dec 9 12:49:26 2022 +0000 Eglot: Handle LSP progress with Emacs progress reporters (bug#59149) Co-authored-by: João Távora <[email protected]> * lisp/progmodes/eglot.el (eglot-report-progress): New custom variable. (eglot-lsp-server): New slot for tracking active progress reporters. (eglot-handle-notification (eql $/progress)): New method. The LSP spec describes methods for reporting progress on long running jobs to the client: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#progress https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workDoneProgress This change reports those notifications in the minibuffer as they come in. It shows a percent indicator (if the server provides theme), or a spinner. This change could open the door for writing a "cancel long running request" command, which are identified by these progress notifications. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_workDoneProgress_cancel * doc/misc/eglot.texi (Customizing Eglot): Describe new variable. commit 0cfeb1c2bc98b3b4c9ea8c28d176ac65b9211f7f Author: dannyfreeman <[email protected]> Date: Fri Dec 9 11:40:53 2022 +0000 Eglot: cleanup whitespace and indentation Co-authored-by: João Távora <[email protected]> * lisp/progmodes/eglot: Misc whitespace fixes. commit fef17557365010a03059f3954da89f74408b3485 Author: João Távora <[email protected]> Date: Wed Dec 7 10:59:30 2022 +0000 Use new external-completion.el in Eglot This refactor simplifies Eglot's source code. * lisp/progmodes/eglot.el: (Package-Requires): Require external-completion. (external-completion): Require it. (xref-backend-identifier-completion-table): Use external-completion-table. (completion-category-overrides): No longer set it. ("Backend Completion"): Delete section. commit bfc00f1c12047ff431eaa9da3a744807c3f9e6e2 Author: João Távora <[email protected]> Date: Wed Dec 7 11:30:34 2022 +0000 Eglot: fix setting of flymake-list-only-diagnostics (bug#59824) When Eglot receives diagnostics for a file not yet visited in Emacs, it stores them in flymake-list-only-diagnostics, which feed M-x flymake-show-project-diagnostics. If the file is eventually visited in a buffer and Eglot starts receibing diagnostics for it, the flymake-list-only-diagnostics database has to be updated accordingly, since the previous diagnostics are now stale. * lisp/progmodes/eglot.el (eglot-handle-notification): Reset flymake-list-only-diagnostics commit 2b9cd50f935d06e627c7a6de239b78dafbff670a Author: Brian Leung <[email protected]> Date: Fri Dec 2 03:02:30 2022 -0800 Add tsx-ts-mode to eglot-server-programs * lisp/progmodes/eglot.el (eglot-server-programs): Add tsx-ts-mode. (Bug#59770) commit 00cb6e052a6adce087e24871068737e10c8adc10 Author: Stefan Kangas <[email protected]> Date: Tue Nov 29 20:28:16 2022 +0100 ; Improve error message when LSP server not found * lisp/progmodes/eglot.el (eglot--guess-contact): Improve wording of error message when no LSP server was found. commit 5b325a03c50d5d828d2a7934bb74f30a45fa108d Author: Stefan Kangas <[email protected]> Date: Mon Nov 28 15:32:25 2022 +0100 ; Fix typo in eglot-alternatives (Bug#59653) * lisp/progmodes/eglot.el (eglot-alternatives): Fix typo. Problem reported by Arash Esbati <[email protected]>. commit 40ff40198d817b1385694499a4dce9adb313ea6f Author: Theodor Thornhill <[email protected]> Date: Sat Nov 26 21:12:51 2022 +0100 Add js-ts-mode to eglot-server-programs * lisp/progmodes/eglot.el (eglot-server-programs): Add js-ts-mode as an alternative. (Bug#59252) commit 372f8c5bffd8c18c95900a1fb53eb992b8a493aa Author: Brian Leung <[email protected]> Date: Fri Nov 25 18:16:52 2022 -0800 eglot-server-programs: ts-mode -> typescript-ts-mode * lisp/progmodes/eglot.el (eglot-server-programs): Fix name of 'typescript-ts-mode' after rename from 'ts-mode'. (Bug#59589) commit 5ce34327eef604c27ba0d4223045c49fdc66fd38 Author: Brian Leung <[email protected]> Date: Thu Nov 24 10:48:07 2022 -0800 Add more tree-sitter modes to eglot-server-programs * lisp/progmodes/eglot.el (eglot-server-programs): Add python-ts-mode and bash-ts-mode. (Bug#59550) commit 80b2534605698c231abc970ff4ae6b1b87cee13c Author: Eli Zaretskii <[email protected]> Date: Thu Nov 24 20:54:38 2022 +0200 ; * lisp/progmodes/eglot.el (eglot-server-programs): Add csharp-ts-mode. commit 94ec173a732641f00535997e8381b9ef2c2814cd Author: Brian Leung <[email protected]> Date: Sat Nov 12 14:30:37 2022 -0800 Add tree-sitter-based modes to eglot-server-programs * lisp/progmodes/eglot.el (eglot-server-programs): Add tree-sitter-based major modes. (Bug#59229) commit d34fc7b7aa9d2779ebbada5cecd8bd2806e3e01e Author: dannyfreeman <[email protected]> Date: Thu Nov 24 15:22:33 2022 +0000 Eglot: don't confuse URLs and windows file paths bug#59338 * lisp/progmodes/eglot.el (eglot--path-to-uri): Check for windows path commit fcd5fde090022c2b1a6c8e130634539892857f9a Author: João Távora <[email protected]> Date: Thu Nov 24 14:48:35 2022 +0000 Remove fboundp check in eglot--connect project.el is a GNU ELPA :core package, so this kind of trick isn't needed. * lisp/progmodes/eglot.el (eglot--connect): Don't fboundp project-name. commit cf439636d466d999a1f064fe9783013d3f3db17d Author: Marcin Pajkowski <[email protected]> Date: Sun Nov 20 20:03:57 2022 +0100 Eglot: Advertise completion.resolveSupport capabilities Some servers avoid reporting completion items that require "additionalTextEdits" capability. Actually, 'eglot-completion-at-point' function supports such feature so it can be advertised to LSP server. * lisp/progmodes/eglot.el (eglot-client-capabilities): Advertise resolveSupport. (bug#59465) Copyright-paperwork-exempt: yes commit 1f39da3098a2a4cec9985e6db934ed14b7b522b7 Author: Stephen Leake <[email protected]> Date: Tue Nov 22 11:43:22 2022 -0800 * lisp/progmodes/eglot.el (eglot--connect): Use project-name As discussed in bug#48747. commit beaa2e49530b8149d2c22cb5fa15b8d48f7937b6 Author: Stefan Kangas <[email protected]> Date: Mon Nov 21 15:16:08 2022 +0100 ; Fix typos (misspelled symbols) commit 6b0179f7908c658342d1e642e5444e3d2e1cd997 Author: Stephen Leake <[email protected]> Date: Sun Nov 20 13:45:13 2022 -0800 Delete eglot spinner; not useful * lisp/progmodes/eglot.el (eglot-lsp-server): Delete slot spinner. (eglot--mode-line-format): Don't include spinner in mode-line. (eglot--signal-textDocument/didChange): Don't set spinner. commit 16318bfb518aa7bc06e502e6fad7e53ec91067f9 Author: Stefan Kangas <[email protected]> Date: Sun Nov 20 12:59:39 2022 +0100 ; Fix typos commit b6a7b42b199d4e96312bf8147d36dddbcf14f4ea Author: Eli Zaretskii <[email protected]> Date: Thu Nov 17 11:47:34 2022 +0200 * lisp/progmodes/eglot.el (eglot-server-programs): Remove Intelephense. commit 954a5e79dc8670e93ee72b3f835ec82e847dc23d Author: USAMI Kenta <[email protected]> Date: Fri Nov 11 22:57:06 2022 +0900 Add Eglot alternatives for PHP language servers * lisp/progmodes/eglot.el (eglot-server-programs): Add alternatives for PHP. commit 93036209fae87dc620b27b2ce2e0146e6252113c Author: Stefan Kangas <[email protected]> Date: Thu Nov 17 09:31:46 2022 +0100 ; Fix typos (duplicate words) commit 623db40dd1cd21623c5cecdc0abbf3ce885f92b1 Author: Juanma Barranquero <[email protected]> Date: Thu Nov 17 08:45:57 2022 +0100 ; * lisp/*.el: Fix typos in docstrings * lisp/gnus/nnrss.el (nnrss-use-local, nnrss-fetch, nnrss-find-el): * lisp/leim/quail/japanese.el ("japanese"): * lisp/org/ol.el (org-link-search-must-match-exact-headline): * lisp/org/org-faces.el (org-column): * lisp/progmodes/eglot.el (eglot--stay-out-of-p) (eglot-workspace-configuration, eglot--read-execute-code-action): * lisp/vc/vc.el (vc-clone): Fix typos in docstrings. commit 7d53164162b3e36b53f52f4132cea3202919f749 Author: Ingo Lohmar <[email protected]> Date: Sun Nov 13 17:27:12 2022 +0100 Eglot: fix null scopeUri regression in workspace/configuration * lisp/progmodes/eglot.el (eglot-handle-request): Commit 1a2d603bb3938ff68ed1a5412d131b41efd40a24 changed `eglot--uri-to-path' to return a nil uri untouched. (Before, `url-unhex-string' turned the parsed all-nil uri record into the empty string.) A nil return value must now be handled in the caller, do that for the workspace/configuration handler to avoid an uncaught error. commit ae9e4414159b974e299f891a4edb46c89ca5b7ba Author: Davide Masserut <[email protected]> Date: Sun Nov 13 12:30:43 2022 +0100 Add new Go modes to eglot-server-programs * lisp/progmodes/eglot.el (eglot-server-programs): Add new major modes for Go to be used with gopls. (Bug#59245) commit 9d334f558a1151ff12b7022a88c75ceb4f1fbdf4 Author: Michal Dubiel <[email protected]> Date: Sun Oct 23 19:54:31 2022 +0200 eglot: Support signature labels without a function name * lisp/progmodes/eglot.el (eglot--sig-info): Support signature labels without a function name. (Bug#58777) Copyright-paperwork-exempt: yes commit d794f1d3f22af458c496978fc89bbb5be37f433e Author: Shohei YOSHIDA <[email protected]> Date: Sat Nov 12 22:13:57 2022 +0900 Add cperl-mode to eglot-server-programs commit be1745606354e8b34325bc9526c9bad9f7302cce Author: Brian Leung <[email protected]> Date: Tue Feb 2 11:23:25 2021 -0800 Make Eglot consider FileSystemWatcher.kind when watching files bug#58677 * eglot.el (eglot-register-capability workspace/didChangeWatchedFiles): Rework Only send notifications of interest, as determined by the optional LSP FileSystemWatcher.kind bitmask provided by the server. When the FileSystemWatcher.kind property is omitted, use the default value of 7, which is computed from taking the bitwise OR operation WatchKind.Create (1) | WatchKind.Change (2) | WatchKind.Delete (4). commit 6f48b46b03cd58a541684c57e42eb4679794f0fd Author: Stefan Kangas <[email protected]> Date: Fri Nov 11 15:46:23 2022 +0100 ; Fix typos commit c64d94c84979425665b9ca88c1cad5830d2fabe0 Author: Stefan Kangas <[email protected]> Date: Fri Nov 11 13:55:11 2022 +0100 eglot: Remove menu entry for manual * lisp/progmodes/eglot.el (eglot-manual): Make obsolete. Open the eglot info manual instead of the less exhaustive README. (eglot-menu): Remove entry for reading the manual. (Bug#58892) commit 23b49c0178d0c651c3af115fe2f357df0cdaaf01 Author: João Távora <[email protected]> Date: Fri Nov 11 09:30:49 2022 +0000 ; Tweak comment in lisp/progmodes/eglot.el (bug#58790) * lisp/progmodes/eglot.el (eglot--uri-to-path): Tweak comment. commit 05d1186b7af9b4daf4c067526ff390d53ac866ae Author: Eli Zaretskii <[email protected]> Date: Fri Nov 11 10:22:29 2022 +0200 ; Fix a typo in last change. commit d764a2bfa88c4b33a290acd088ef4a4315d8902d Author: Eli Zaretskii <[email protected]> Date: Fri Nov 11 10:21:45 2022 +0200 ; * lisp/progmodes/eglot.el (eglot--path-to-uri): Improve commentary. commit 1a2d603bb3938ff68ed1a5412d131b41efd40a24 Author: dannyfreeman <[email protected]> Date: Thu Nov 3 09:39:16 2022 -0400 Eglot: Only handle URIs with the file:// scheme (bug#58790) Eglot will not attempt to parse URIs that are not file:// type at all. Instead let 'file-name-handler-alist' entries to deal with those. Not parsing them at all allows the 'file-name-handler-alist' regexps to identify them more accurately. By also checking if Eglot received a URI in 'eglot--path-to-uri', 'file-name-handler-alist' can provide the non-file type URI back to the lsp server, which presumably will know how to handle them since it is also giving them out to clients. This issue originated with clojure-lsp sending clients "jar:" type URIs that Emacs is unable to handle out of the box. Before this change, "jar:" URIs were parsed once, but since they contain a nested URI, this resulted in a file being dispatched with a partially parsed path that looked like "file://path/to.jar!/path/in/jar". * lisp/progmodes/eglot.el (eglot--path-to-uri): Noop if already an URI. (eglot--uri-to-path): Only handle file:// URIs commit c3b64985aa6f61886a24974836635284c86478ef Author: João Távora <[email protected]> Date: Thu Nov 10 21:06:33 2022 +0000 Improve Eglot's docstrings and manual The examples in the manual can now be copy-pasted to user's init files as-is. * doc/misc/eglot.texi (Setting Up LSP Servers): Use `with-eval-after-load'. Add eglot-alternatives example. (Customizing Eglot): Use 'require and fix a typo. * lisp/progmodes/eglot.el (eglot-server-programs): Mention eglot-alternatives in eglot-server-program's docstring. commit c833b291f57e61613cbf09cffae478aa02e6ecc5 Author: Evgeni Kolev <[email protected]> Date: Thu Nov 10 17:17:44 2022 +0000 Ignore errors when shutting down all LSP servers (bug#59146) eglot-shutdown-all has a bug that results in partially stopping servers: when a server shutdown timeouts (1.5s), an error is propagated and eglot-shutdown-all does not try to shutdown the rest of the servers. * eglot.el (eglot-shutdown-all): Ignore errors when shutting down servers, converting errors to messages. commit dc4aef3b85f22e5d529c5ceb0686f26781587601 Author: Arash Esbati <[email protected]> Date: Thu Nov 10 10:18:43 2022 +0100 Support 'texlab' LSP server in Eglot OOTB * lisp/progmodes/eglot.el (eglot-server-programs): Add support for 'texlab' LSP server for tex-mode and similar languages. commit 43db0e2784bfafdb8b08a2f5f075e2d432df132f Author: Stephen Leake <[email protected]> Date: Wed Nov 9 06:00:40 2022 -0800 Delete emacs < 26.2 workaround in eglot--apply-text-edits * lisp/progmodes/eglot.el (eglot--apply-text-edits): Delete emacs < 26.2 workaround; fixes bug in ada-mode test. commit 5b9b393c614f18f7cc2260436fbf99ed2a6d05ed Author: Stephen Leake <[email protected]> Date: Tue Nov 8 09:45:26 2022 -0800 * lisp/progmodes/eglot.el (eglot--pos-to-lsp-position): Improve comment commit 969d71d11c62ae085f094a96ecea2fb504bb4602 Author: Juri Linkov <[email protected]> Date: Wed Nov 2 20:22:10 2022 +0200 Add the parameter :noquery to open-network-stream (bug#58948) * doc/lispref/processes.texi (Network): Add :noquery for open-network-stream. * lisp/net/network-stream.el (open-network-stream): Pass the parameter :noquery to make-network-process. Doc fix. * lisp/progmodes/eglot.el (eglot--connect): Pass `:noquery t' to eglot--inferior-bootstrap to use in open-network-stream call, like `:noquery t' is passed to make-process in other places. commit 4cc32937c06f7dd66da025fdb98369f456f1af0a Author: Stephen Leake <[email protected]> Date: Mon Oct 31 17:30:02 2022 -0700 Fix eglot-shutdown-all: Match current eglot-shutdown signature commit db2ed9f333879e5ac283fb48c8b06ed4022f0af9 Author: Stefan Kangas <[email protected]> Date: Wed Oct 26 22:41:09 2022 +0200 ; Fix several symbol name typos commit c8fe6aae0ac352e48fff2bdec966a0605be63bac Author: Stefan Kangas <[email protected]> Date: Tue Oct 25 16:42:58 2022 +0200 eglot: Prefer ensure-list on Emacs 28 or later * lisp/progmodes/eglot.el (eglot--ensure-list): Make into alias for 'ensure-list' on Emacs 28 or later. commit 8c3b8c36677eedfc3839488e3cef9f6a5937baa3 Author: Robert Pluim <[email protected]> Date: Tue Oct 25 15:18:51 2022 +0200 Fix eglot defcustom types * lisp/progmodes/eglot.el (eglot-autoreconnect): Allow for 'nil'. (eglot-connect-timeout): Allow for 'nil' and add descriptions. (eglot-sync-connect): Split boolean into 'nil' and 't' and add descriptions. (eglot-confirm-server-initiated-edits): Change 'symbol' type to 'const'. commit 5b90a718ee6674544f892aa572ff042c1ae2a21f Author: Robert Pluim <[email protected]> Date: Tue Oct 25 15:15:34 2022 +0200 * lisp/progmodes/eglot.el: Remove not very funny joke. commit bb95e597a9adcba0080cba85b2270fdf80696b3a Author: Brian Leung <[email protected]> Date: Mon Oct 24 20:46:41 2022 -0700 eglot-server-programs: Account for new ts-mode At the time of writing, this exists only in the unmerged tree-sitter branch. It is not harmful to include, however. * lisp/progmodes/eglot.el (eglot-server-programs): Add new major mode to be used with the typescript-language-server. (Bug#58769) commit 566e410287d9898f90c81131bfa8c85462fab55e Author: Brian Leung <[email protected]> Date: Mon Oct 24 20:43:50 2022 -0700 eglot-server-programs: Account for new js-json-mode js-json-mode derives from js-mode, so this reordering is necessary to prevent js-mode's eglot server from starting if a user has something like this in their config: (add-to-hook 'js-json-mode #'eglot-ensure) (add-to-hook 'js-mode #'eglot-ensure) * lisp/progmodes/eglot.el (eglot-server-programs): Move the json-language-server info before the entry for js-mode, and add on js-json-mode. (Bug#58769) commit 0b1eda215d32839c9f6281d20f8a347f34bb5ab5 Author: João Távora <[email protected]> Date: Tue Oct 25 10:34:08 2022 +0100 Fix M-x eglot breakage due to typo * lisp/progmodes/eglot.el (eglot): Fix bug. commit 31945b6c3fcbdb6f242f0063811d2fb91e4520cd Author: Stephen Leake <[email protected]> Date: Tue Oct 25 02:15:13 2022 -0700 * lisp/progmodes/eglot.el (eglot): Ensure managed-major-mode is a list commit 3ad9ac25a86b1ef98e27efebfb920780eca4bb77 Author: Brian Leung <[email protected]> Date: Thu Oct 20 22:47:10 2022 -0700 Add the "nil" language server to eglot-server-programs * lisp/progmodes/eglot.el (eglot-server-programs): Add the "nil" language server. Put it before rnix-lsp since it is more featureful and more actively updated. (Bug#58676) Ref: https://github.com/oxalica/nil commit 81177e77cff1aa0912e5ad7a58db09bcb9901c36 Author: Brian Leung <[email protected]> Date: Thu Oct 20 22:49:08 2022 -0700 Add lua-language-server to eglot-server-programs * lisp/progmodes/eglot.el (eglot-server-programs): Add lua-language-server. It is, at the time of writing, more actively developed and more popular than the lua-lsp server, so prioritize that. (Bug#58676) commit 1324baea728a11bf650303698881c682105155da Author: Eli Zaretskii <[email protected]> Date: Thu Oct 20 20:50:34 2022 +0300 Add Eglot to the menu bar * lisp/progmodes/eglot.el (eglot): Improve the doc string. * lisp/menu-bar.el (menu-bar-tools-menu): Add Eglot to the menu. commit 8b3a7003274de7b184b71c4552e6c4518948bcfe Author: João Távora <[email protected]> Date: Thu Oct 20 13:49:49 2022 +0100 ; fix warning about order of defvaralias/defconst * lisp/progmodes/eglot.el (eglot-{}): Declare alias before thing being aliased. commit 806734c1b1f433de43d59d9a5e3a1e89d64315f6 Author: João Távora <[email protected]> Date: Thu Oct 20 11:06:44 2022 +0100 Expose eglot-{} to be used in eglot-workspace-configuration * eglot.el (eglot-{}): New variable alias. GitHub-reference: per https://github.com/joaotavora/eglot/issues/1084 commit 9801e217f9842190f2303e46f6d41202cfe6b546 Author: João Távora <[email protected]> Date: Thu Oct 20 10:48:11 2022 +0100 Rework header of eglot.el * eglot.el (Commentary): Rework. commit eb9d6281b58f50927afdc2fdb2fcebf76e2ffe23 Author: João Távora <[email protected]> Date: Mon Oct 10 13:57:26 2022 +0100 Do use eglot-connect-timeout if eglot-sync-connect is t Reported by Eli Zaretskii <[email protected]> * eglot.el (eglot--connect): Use eglot-connect-timeout in the case eglot-sync-connect is t.
- Loading branch information