diff options
author | Felicián Németh <felician.nemeth@gmail.com> | 2019-11-30 13:18:06 +0100 |
---|---|---|
committer | Felicián Németh <felician.nemeth@gmail.com> | 2019-11-30 13:18:06 +0100 |
commit | 3f2ca038d10fb16b9193541d140a519e1e9c7fe2 (patch) | |
tree | b67b7f49fea4b1bdb290eef0aabb2cdba96562e1 /eglot-x.el | |
parent | b87dedcef3b08a8e771e51acfb8682f2320869b1 (diff) |
Replace the obsoleted eglot--current-server calls
* eglot-x.el (eglot-x--extra-refs-alist): Rename from
eglot-x--extra-refs-map.
(eglot-x-find-refs): Use eglot-curent-server instead of the
obsoleted eglot--current-server. Apply the rename.
Diffstat (limited to 'eglot-x.el')
-rw-r--r-- | eglot-x.el | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -240,11 +240,11 @@ assumed to be an element of `project-files'." ;; API functions, variables, and the implementation is not yet set in ;; stone. -(defvar eglot-x--extra-refs-map +(defvar eglot-x--extra-refs-alist '(("ccls" . ;; https://github.com/MaskRay/ccls/wiki/LSP-Extensions (("reload" (lambda () - (jsonrpc-notify (eglot--current-server) + (jsonrpc-notify (eglot-current-server) :$ccls/reload (make-hash-table)))) ("vars" :$ccls/vars) @@ -274,12 +274,14 @@ See `eglot-x-enable-refs'." (interactive) (unless eglot-x-enable-refs (eglot--error "Feature is disabled (`eglot-x-enable-refs')")) + (unless (eglot-current-server) + (eglot--error "No active LSP server")) (let* ((server-name - (plist-get (eglot--server-info (eglot--current-server)) :name)) - (extra-refs-map - (alist-get server-name eglot-x--extra-refs-map - (alist-get t eglot-x--extra-refs-map) nil #'equal)) - (menu `("Extra refs:" ,`("dummy" . ,extra-refs-map))) + (plist-get (eglot--server-info (eglot-current-server)) :name)) + (extra-refs-alist + (alist-get server-name eglot-x--extra-refs-alist + (alist-get t eglot-x--extra-refs-alist) nil #'equal)) + (menu `("Extra refs:" ,`("dummy" . ,extra-refs-alist))) (selected (tmm-prompt menu))) (if (functionp (car selected)) (apply #'funcall selected) |