Skip to content

Commit 481fb13

Browse files
committed
Add support for pubspec.yaml completions
1 parent 10e309a commit 481fb13

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lsp-dart-flutter-daemon.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ of this command."
157157
"Major mode for `lsp-dart-flutter-daemon-start`."
158158
(setq comint-prompt-read-only nil)
159159
(setq comint-process-echoes nil)
160+
(setenv "CHROME_EXECUTABLE" "/nix/store/4dqgvxp1hdzqqhxfjp83l2c9ll32z5f0-system-path/bin/google-chrome-stable")
160161
(setenv "PATH" (concat (lsp-dart-flutter-command) ":" (getenv "PATH"))))
161162

162163
(provide 'lsp-dart-flutter-daemon)

lsp-dart.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ If unspecified, diagnostics will not be generated."
142142
(lsp-register-client
143143
(make-lsp-client :new-connection
144144
(lsp-stdio-connection #'lsp-dart--server-command)
145-
:major-modes '(dart-mode)
146-
:priority -1
145+
:activation-fn (lambda (filename &optional _)
146+
(or (derived-mode-p 'dart-mode)
147+
(string= (f-filename filename) "pubspec.yaml")))
148+
:priority 1
147149
:initialization-options
148150
`((onlyAnalyzeProjectsWithOpenFiles . ,lsp-dart-only-analyze-projects-with-open-files)
149151
(suggestFromUnimportedLibraries . ,lsp-dart-suggest-from-unimported-libraries)

0 commit comments

Comments
 (0)