@@ -99,6 +99,7 @@ If unspecified, diagnostics will not be generated."
99
99
100
100
; ;; Internal
101
101
102
+ (defvar lsp-dart-version-string " 1.19.2" )
102
103
(declare-function pkg-info-version-info " ext:pkg-info" )
103
104
104
105
(defun lsp-dart--library-folders ()
@@ -119,16 +120,12 @@ If unspecified, diagnostics will not be generated."
119
120
120
121
(defun lsp-dart--server-command ()
121
122
" Generate LSP startup command."
122
- (let ((client-version (format " --client-version %s "
123
- (or (when (require 'pkg-info nil t )
124
- (pkg-info-version-info 'lsp-dart ))
125
- " unknown-version" ))))
126
- (or lsp-dart-server-command
127
- (list (lsp-dart-dart-command)
128
- (expand-file-name (f-join (lsp-dart-get-sdk-dir) " bin/snapshots/analysis_server.dart.snapshot" ))
129
- " --lsp"
130
- " --client-id emacs.lsp-dart"
131
- client-version))))
123
+ (or lsp-dart-server-command
124
+ (list (lsp-dart-dart-command)
125
+ (expand-file-name (f-join (lsp-dart-get-sdk-dir) " bin/snapshots/analysis_server.dart.snapshot" ))
126
+ " --lsp"
127
+ " --client-id emacs.lsp-dart"
128
+ (format " --client-version %s " lsp-dart-version-string))))
132
129
133
130
(defun lsp-dart--activate-features ()
134
131
" Activate lsp-dart features if enabled."
@@ -180,10 +177,8 @@ The returned string includes the version from main file header,
180
177
181
178
If the version number could not be determined, signal an error."
182
179
(interactive )
183
- (let* ((version (and (require 'pkg-info nil t )
184
- (pkg-info-version-info 'lsp-dart )))
185
- (lsp-dart-string (format " %s at %s @ Emacs %s "
186
- (or version " unknown" )
180
+ (let* ((lsp-dart-string (format " %s at %s @ Emacs %s "
181
+ lsp-dart-version-string
187
182
(format-time-string " %Y.%m.%d" (current-time ))
188
183
emacs-version))
189
184
(dart-sdk-string (if (lsp-dart-get-sdk-dir)
0 commit comments