@@ -51,6 +51,14 @@ The slash is expected at the end."
51
51
:group 'lsp-java
52
52
:type 'string )
53
53
54
+ (defvar lsp-java-progress-string " "
55
+ " Path of the java executable." )
56
+
57
+ (defface lsp-java-progress-face
58
+ '((t (:inherit 'success )))
59
+ " face for activity message"
60
+ :group 'lsp-java )
61
+
54
62
(defcustom lsp-java-workspace-dir (expand-file-name (locate-user-emacs-file " workspace/" ))
55
63
" LSP java workspace directory."
56
64
:group 'lsp-java
@@ -435,8 +443,13 @@ PARAMS the parameters for actionable notifications."
435
443
" Progress report handling.
436
444
437
445
PARAMS progress report notification data."
438
- (let ((inhibit-message lsp-java-inhibit-message))
439
- (lsp-message " %s%s" (gethash " status" params) (if (gethash " complete" params) " (done)" " " ))))
446
+ (-let [(&hash " status" " complete" ) params]
447
+ (setq lsp-java-progress-string (propertize (s-replace " %" " %%" status) 'face 'lsp-java-progress-face ))
448
+ (when complete
449
+ (run-with-idle-timer 0.8 nil (lambda ()
450
+ (setq lsp-java-progress-string nil ))))))
451
+
452
+ (put 'lsp-java-progress-string 'risky-local-variable t )
440
453
441
454
(defun lsp-java--render-string (str )
442
455
" Render STR with `java-mode' syntax highlight."
@@ -857,6 +870,8 @@ PROJECT-URI uri of the item."
857
870
(xref--show-xrefs (lsp--locations-to-xref-items refs) nil )
858
871
(user-error " No implementations" )))
859
872
873
+ (add-to-list 'global-mode-string (list '(t lsp-java-progress-string)))
874
+
860
875
(lsp-register-client
861
876
(make-lsp--client
862
877
:new-connection (lsp-stdio-connection 'lsp-java--ls-command )
0 commit comments