[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot a6fa773 25/54: Resolve compilation warnings
From: |
João Távora |
Subject: |
[elpa] externals/eglot a6fa773 25/54: Resolve compilation warnings |
Date: |
Thu, 16 Apr 2020 05:31:49 -0400 (EDT) |
branch: externals/eglot
commit a6fa7730b6174ba90ab01e10fc9de190b77ec26e
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Resolve compilation warnings
* eglot.el (company-tooltip-align-annotations): Forward declare.
(eglot--cached-server): Renamed from eglot--cached-current-server.
(eglot--managed-mode, eglot-current-server)
(eglot--current-server-or-lose)
(eglot--maybe-activate-editing-mode): use it.
(eglot-completion-at-point): Don't use insertTextFormat.
---
eglot.el | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/eglot.el b/eglot.el
index a327655..90f2c68 100644
--- a/eglot.el
+++ b/eglot.el
@@ -71,7 +71,8 @@
(require 'filenotify)
(require 'ert)
(require 'array)
-(defvar company-backends) ; forward-declare, but don't require company yet
+(defvar company-backends) ; forward-declare, but don't require company
+(defvar company-tooltip-align-annotations)
@@ -1222,6 +1223,9 @@ For example, to keep your Company customization use
(push (cons ',symbol (symbol-value ',symbol)) eglot--saved-bindings)
(setq-local ,symbol ,binding)))
+(defvar-local eglot--cached-server nil
+ "A cached reference to the current EGLOT server.")
+
(define-minor-mode eglot--managed-mode
"Mode for source buffers managed by some EGLOT project."
nil nil eglot-mode-map
@@ -1251,7 +1255,7 @@ For example, to keep your Company customization use
#'eglot-imenu))
(flymake-mode 1)
(eldoc-mode 1)
- (cl-pushnew (current-buffer) (eglot--managed-buffers
eglot--cached-current-server)))
+ (cl-pushnew (current-buffer) (eglot--managed-buffers
eglot--cached-server)))
(t
(remove-hook 'after-change-functions 'eglot--after-change t)
(remove-hook 'before-change-functions 'eglot--before-change t)
@@ -1270,8 +1274,8 @@ For example, to keep your Company customization use
do (set (make-local-variable var) saved-binding))
(remove-function (local 'imenu-create-index-function) #'eglot-imenu)
(setq eglot--current-flymake-report-fn nil)
- (let ((server eglot--cached-current-server))
- (setq eglot--cached-current-server nil)
+ (let ((server eglot--cached-server))
+ (setq eglot--cached-server nil)
(when server
(setf (eglot--managed-buffers server)
(delq (current-buffer) (eglot--managed-buffers server)))
@@ -1284,16 +1288,13 @@ For example, to keep your Company customization use
"Turn off `eglot--managed-mode' unconditionally."
(eglot--managed-mode -1))
-(defvar-local eglot--cached-current-server nil
- "A cached reference to the current EGLOT server.")
-
(defun eglot-current-server ()
"Return logical EGLOT server for current buffer, nil if none."
- eglot--cached-current-server)
+ eglot--cached-server)
(defun eglot--current-server-or-lose ()
"Return current logical EGLOT server connection or error."
- (or eglot--cached-current-server
+ (or eglot--cached-server
(jsonrpc-error "No current JSON-RPC connection")))
(defvar-local eglot--unreported-diagnostics nil
@@ -1313,8 +1314,8 @@ If it is activated, also signal textDocument/didOpen."
;; `revert-buffer-preserve-modes' is nil.
(when (and buffer-file-name
(or
- eglot--cached-current-server
- (setq eglot--cached-current-server
+ eglot--cached-server
+ (setq eglot--cached-server
(cl-find major-mode
(gethash (or (project-current)
`(transient . ,default-directory))
@@ -2026,7 +2027,7 @@ is not active."
(funcall proxies)))))
:annotation-function
(lambda (proxy)
- (eglot--dbind ((CompletionItem) detail kind insertTextFormat)
+ (eglot--dbind ((CompletionItem) detail kind)
(get-text-property 0 'eglot--lsp-item proxy)
(let* ((detail (and (stringp detail)
(not (string= detail ""))
- [elpa] externals/eglot 576ea2e 02/54: Unbreak M-x vc-revert, which reverts preserving modes, (continued)
- [elpa] externals/eglot 576ea2e 02/54: Unbreak M-x vc-revert, which reverts preserving modes, João Távora, 2020/04/16
- [elpa] externals/eglot 32ba9d0 06/54: Expand README.md section on handling quirky servers, João Távora, 2020/04/16
- [elpa] externals/eglot 3d480d1 01/54: Fix #259 (again): fix issue with replace-buffer-contents, João Távora, 2020/04/16
- [elpa] externals/eglot 83b2acb 09/54: Support markdown for textDocument/hover (#329), João Távora, 2020/04/16
- [elpa] externals/eglot de7631d 17/54: Fix #345: set nobreak-char-display to nil in *eglot-help*, João Távora, 2020/04/16
- [elpa] externals/eglot 179a56d 13/54: Only set eglot--cached-current-server by (more aggressive) caching, João Távora, 2020/04/16
- [elpa] externals/eglot 146108a 15/54: Fix #342: Provide stable eglot-current-server helper, João Távora, 2020/04/16
- [elpa] externals/eglot 8c9078e 19/54: Fix #343: Let other imenu functions work if LSP server's doesn't, João Távora, 2020/04/16
- [elpa] externals/eglot 4bd8773 23/54: Fix #339: fail when eglot-find-* finds no references, João Távora, 2020/04/16
- [elpa] externals/eglot 76d8f49 10/54: Per #50: use completionItem/resolve more abundantly, João Távora, 2020/04/16
- [elpa] externals/eglot a6fa773 25/54: Resolve compilation warnings,
João Távora <=
- [elpa] externals/eglot b2e4687 29/54: Close #376: add metals as the language server for Scala, João Távora, 2020/04/16
- [elpa] externals/eglot 097eed5 31/54: Close #382: new eglot-confirm-server-initiated-edits defcustom, João Távora, 2020/04/16
- [elpa] externals/eglot 2ab8b59 08/54: Don't run mode hooks in eglot--format-markup, João Távora, 2020/04/16
- [elpa] externals/eglot 88311a2 12/54: Simplify "maybe"-activation, dump "server" arg, João Távora, 2020/04/16
- [elpa] externals/eglot 7f9784c 11/54: Merge -onoff proxy code into minor mode function, João Távora, 2020/04/16
- [elpa] externals/eglot 9eac9de 16/54: Fix #341: protect against empty-string insertText in completions, João Távora, 2020/04/16
- [elpa] externals/eglot b406818 07/54: Fix #326: support workspace/configuration, João Távora, 2020/04/16
- [elpa] externals/eglot ef34797 14/54: Fix #340: Don't choke on workspace/configuration with no scopeUri, João Távora, 2020/04/16
- [elpa] externals/eglot 27fb0c6 18/54: Support serverInfo of LSP 3.15.0, João Távora, 2020/04/16
- [elpa] externals/eglot 893a05a 20/54: Fix #330: ensure process starts in project's root, João Távora, 2020/04/16