[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/eglot2emacs 3aeebe8186 037/120: Change rust language server to r
From: |
João Távora |
Subject: |
feature/eglot2emacs 3aeebe8186 037/120: Change rust language server to rust-analyzer |
Date: |
Thu, 20 Oct 2022 07:16:48 -0400 (EDT) |
branch: feature/eglot2emacs
commit 3aeebe8186dfcc7e4a6df638bd44b4740895427f
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Change rust language server to rust-analyzer
rust-analyzer is the officially blessed Language Server for Rust:
https://github.com/rust-lang/rfcs/pull/2912
Also drop the special support code for RLS.
* eglot.el (eglot-server-programs): Add rust-mode language server
"rust-analyzer" and prefer it to the older "rls".
(eglot-rls, jsonrpc-connection-ready-p)
(eglot-handle-notification): Delete special support for "rls".
* eglot-tests.el (rls-analyzer-watches-files)
(rls-analyzer-hover-after-edit): Rename to ...
(rust-analyzer-watches-files)
(rust-analyzer-hover-after-edit): ... this. Update tests to work
with rust-analyzer.
* README.md: Update references for RLS to point to rust-analyzer.
* NEWS.md: Announce above change.
GitHub-reference: per https://github.com/joaotavora/eglot/issues/803
---
lisp/progmodes/eglot.el | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 14a4d1cd43..fb2f1ba100 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -142,7 +142,7 @@ chosen (interactively or automatically)."
when probe return (cons probe args)
finally (funcall err)))))))
-(defvar eglot-server-programs `((rust-mode . (eglot-rls "rls"))
+(defvar eglot-server-programs `((rust-mode . ("rust-analyzer" "rls"))
(cmake-mode . ("cmake-language-server"))
(vimrc-mode . ("vim-language-server"
"--stdio"))
(python-mode
@@ -2985,25 +2985,6 @@ If NOERROR, return predicate, else erroring function."
`(,self () (re-search-forward ,(concat "\\=" arg)) (,next)))
-;;; Rust-specific
-;;;
-(defclass eglot-rls (eglot-lsp-server) () :documentation "Rustlang's RLS.")
-
-(cl-defmethod jsonrpc-connection-ready-p ((server eglot-rls) what)
- "Except for :completion, RLS isn't ready until Indexing done."
- (and (cl-call-next-method)
- (or ;; RLS normally ready for this, even if building.
- (eq :textDocument/completion what)
- (pcase-let ((`(,_id ,what ,done ,_detail) (eglot--spinner server)))
- (and (equal "Indexing" what) done)))))
-
-(cl-defmethod eglot-handle-notification
- ((server eglot-rls) (_method (eql window/progress))
- &key id done title message &allow-other-keys)
- "Handle notification window/progress."
- (setf (eglot--spinner server) (list id title done message)))
-
-
;;; eclipse-jdt-specific
;;;
(defclass eglot-eclipse-jdt (eglot-lsp-server) ()
- feature/eglot2emacs 14586fedcf 103/120: Don't exceed max-specdl-size in big go projects, (continued)
- feature/eglot2emacs 14586fedcf 103/120: Don't exceed max-specdl-size in big go projects, João Távora, 2022/10/20
- feature/eglot2emacs a8b3b6a526 014/120: Add vim-language-server for vimrc-mode, João Távora, 2022/10/20
- feature/eglot2emacs b1c7aa1d17 003/120: Add yaml-language-server for yaml-mode, João Távora, 2022/10/20
- feature/eglot2emacs 51fc8fc3d2 002/120: Use `locate-user-emacs-file` instead of `concat`, João Távora, 2022/10/20
- feature/eglot2emacs 06f1cd6365 008/120: Add lua-lsp support for lua-mode, João Távora, 2022/10/20
- feature/eglot2emacs 7c712abf8f 009/120: Minor checkdoc fixes, João Távora, 2022/10/20
- feature/eglot2emacs 8a9959e054 039/120: Add clojure-lsp support for clojure, João Távora, 2022/10/20
- feature/eglot2emacs bc05805887 036/120: ; unbreak tests on emacs 26, João Távora, 2022/10/20
- feature/eglot2emacs 8b31247f1c 044/120: Properly check the completionitem.deprecated property, João Távora, 2022/10/20
- feature/eglot2emacs 5b88ec259c 026/120: Change from symbol-at-point to thing-at-point, João Távora, 2022/10/20
- feature/eglot2emacs 3aeebe8186 037/120: Change rust language server to rust-analyzer,
João Távora <=
- feature/eglot2emacs ed4fd33223 043/120: * eglot.el (eglot-handle-notification): silence byte-compiler., João Távora, 2022/10/20
- feature/eglot2emacs 5b62d0071e 040/120: Enable lsp project-wide diagnostics via flymake, João Távora, 2022/10/20
- feature/eglot2emacs 5d2f6bc667 055/120: Map more emacs variables to lsp formattingoptions fields, João Távora, 2022/10/20
- feature/eglot2emacs c06860b0f4 022/120: Bump eglot version to 1.8, João Távora, 2022/10/20
- feature/eglot2emacs 97ded82277 033/120: ; * eglot.el: move obsolete definition to new section., João Távora, 2022/10/20
- feature/eglot2emacs a905bad633 024/120: * eglot.el: improve commentary section., João Távora, 2022/10/20
- feature/eglot2emacs f550342059 069/120: Add out-of-box support for purescript lsp server, João Távora, 2022/10/20
- feature/eglot2emacs f8344871a0 075/120: Update docstring of eglot-events-buffer-size, João Távora, 2022/10/20
- feature/eglot2emacs e72fa6d867 082/120: Experiment with grouping in xref-backend-identifier-completion-table, João Távora, 2022/10/20
- feature/eglot2emacs fd5a5f16d7 081/120: Make c-u m-. work half decently, João Távora, 2022/10/20