diff options
| author | Stephen Leake | 2022-11-20 13:45:13 -0800 |
|---|---|---|
| committer | Stephen Leake | 2022-11-20 13:45:13 -0800 |
| commit | 6b0179f7908c658342d1e642e5444e3d2e1cd997 (patch) | |
| tree | 0e0c84d8f87db7dc0d3cb1095eadb0caa88b2082 | |
| parent | 8ec8decd9f1ab642c7f1406b37a89773345b5aba (diff) | |
| download | emacs-6b0179f7908c658342d1e642e5444e3d2e1cd997.tar.gz emacs-6b0179f7908c658342d1e642e5444e3d2e1cd997.zip | |
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.
| -rw-r--r-- | lisp/progmodes/eglot.el | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 9555d21b00a..c1bda7081c5 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el | |||
| @@ -821,9 +821,6 @@ treated as in `eglot--dbind'." | |||
| 821 | (project | 821 | (project |
| 822 | :documentation "Project associated with server." | 822 | :documentation "Project associated with server." |
| 823 | :accessor eglot--project) | 823 | :accessor eglot--project) |
| 824 | (spinner | ||
| 825 | :documentation "List (ID DOING-WHAT DONE-P) representing server progress." | ||
| 826 | :initform `(nil nil t) :accessor eglot--spinner) | ||
| 827 | (inhibit-autoreconnect | 824 | (inhibit-autoreconnect |
| 828 | :initform t | 825 | :initform t |
| 829 | :documentation "Generalized boolean inhibiting auto-reconnection if true." | 826 | :documentation "Generalized boolean inhibiting auto-reconnection if true." |
| @@ -1924,12 +1921,11 @@ Uses THING, FACE, DEFS and PREPEND." | |||
| 1924 | 1921 | ||
| 1925 | (defun eglot--mode-line-format () | 1922 | (defun eglot--mode-line-format () |
| 1926 | "Compose the Eglot's mode-line." | 1923 | "Compose the Eglot's mode-line." |
| 1927 | (pcase-let* ((server (eglot-current-server)) | 1924 | (let* ((server (eglot-current-server)) |
| 1928 | (nick (and server (eglot-project-nickname server))) | 1925 | (nick (and server (eglot-project-nickname server))) |
| 1929 | (pending (and server (hash-table-count | 1926 | (pending (and server (hash-table-count |
| 1930 | (jsonrpc--request-continuations server)))) | 1927 | (jsonrpc--request-continuations server)))) |
| 1931 | (`(,_id ,doing ,done-p ,_detail) (and server (eglot--spinner server))) | 1928 | (last-error (and server (jsonrpc-last-error server)))) |
| 1932 | (last-error (and server (jsonrpc-last-error server)))) | ||
| 1933 | (append | 1929 | (append |
| 1934 | `(,(propertize | 1930 | `(,(propertize |
| 1935 | eglot-menu-string | 1931 | eglot-menu-string |
| @@ -1955,14 +1951,11 @@ Uses THING, FACE, DEFS and PREPEND." | |||
| 1955 | '((mouse-3 eglot-clear-status "Clear this status")) | 1951 | '((mouse-3 eglot-clear-status "Clear this status")) |
| 1956 | (format "An error occurred: %s\n" (plist-get last-error | 1952 | (format "An error occurred: %s\n" (plist-get last-error |
| 1957 | :message))))) | 1953 | :message))))) |
| 1958 | ,@(when (and doing (not done-p)) | 1954 | ,@(when (cl-plusp pending) |
| 1959 | `("/" ,(eglot--mode-line-props doing | 1955 | `("/" ,(eglot--mode-line-props |
| 1960 | 'compilation-mode-line-run '()))) | 1956 | (format "%d" pending) 'warning |
| 1961 | ,@(when (cl-plusp pending) | 1957 | '((mouse-3 eglot-forget-pending-continuations |
| 1962 | `("/" ,(eglot--mode-line-props | 1958 | "Forget pending continuations")) |
| 1963 | (format "%d" pending) 'warning | ||
| 1964 | '((mouse-3 eglot-forget-pending-continuations | ||
| 1965 | "Forget pending continuations")) | ||
| 1966 | "Number of outgoing, \ | 1959 | "Number of outgoing, \ |
| 1967 | still unanswered LSP requests to the server\n")))))))) | 1960 | still unanswered LSP requests to the server\n")))))))) |
| 1968 | 1961 | ||
| @@ -2414,7 +2407,6 @@ When called interactively, use the currently active server" | |||
| 2414 | vconcat `[,(list :range `(:start ,beg :end ,end) | 2407 | vconcat `[,(list :range `(:start ,beg :end ,end) |
| 2415 | :rangeLength len :text text)])))) | 2408 | :rangeLength len :text text)])))) |
| 2416 | (setq eglot--recent-changes nil) | 2409 | (setq eglot--recent-changes nil) |
| 2417 | (setf (eglot--spinner server) (list nil :textDocument/didChange t)) | ||
| 2418 | (jsonrpc--call-deferred server)))) | 2410 | (jsonrpc--call-deferred server)))) |
| 2419 | 2411 | ||
| 2420 | (defun eglot--signal-textDocument/didOpen () | 2412 | (defun eglot--signal-textDocument/didOpen () |