Skip to content

Commit cd9f766

Browse files
committed
Migrate analyzerStatus notification
1 parent 35e3ca2 commit cd9f766

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lsp-dart-protocol.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121

2222
(require 'lsp-protocol)
2323

24+
(lsp-interface
25+
(AnalyzerStatusNotification (:isAnalyzing) nil))
26+
2427
(lsp-interface
2528
(OutlineNotification (:uri :outline) nil)
2629
(Outline (:element :range :codeRange :children) nil)

lsp-dart.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
(require 'dash)
3030
(require 'lsp-mode)
3131

32+
(require 'lsp-dart-protocol)
3233
(require 'lsp-dart-utils)
3334
(require 'lsp-dart-flutter-daemon)
3435
(require 'lsp-dart-closing-labels)
@@ -85,13 +86,13 @@ imported into the current file."
8586
,(expand-file-name (f-join (lsp-dart-get-sdk-dir) "bin/snapshots/analysis_server.dart.snapshot"))
8687
"--lsp")))
8788

88-
(defun lsp-dart--handle-analyzer-status (workspace params)
89+
(lsp-defun lsp-dart--handle-analyzer-status (workspace (&AnalyzerStatusNotification :is-analyzing))
8990
"Handle analyzer status notification for WORKSPACE.
9091
PARAMS is the data sent from server."
9192
(when (and (not (lsp-dart-flutter-daemon--running-p))
9293
(lsp-dart--flutter-project-p))
9394
(lsp-dart-flutter-daemon-start))
94-
(if (gethash "isAnalyzing" params)
95+
(if is-analyzing
9596
(lsp-dart-workspace-status "Analyzing project..." workspace)
9697
(lsp-dart-workspace-status nil workspace)))
9798

0 commit comments

Comments
 (0)