File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
apps/language_server/lib/language_server Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -418,7 +418,8 @@ defmodule ElixirLS.LanguageServer.Server do
418
418
end
419
419
end
420
420
421
- defp handle_notification ( did_change_watched_files ( changes ) , state = % __MODULE__ { } ) do
421
+ defp handle_notification ( did_change_watched_files ( changes ) , state = % __MODULE__ { } )
422
+ when is_binary ( state . project_dir ) do
422
423
changes = Enum . filter ( changes , & match? ( % { "uri" => "file:" <> _ } , & 1 ) )
423
424
424
425
# `settings` may not always be available here, like during testing
@@ -486,6 +487,11 @@ defmodule ElixirLS.LanguageServer.Server do
486
487
if needs_build , do: trigger_build ( state ) , else: state
487
488
end
488
489
490
+ defp handle_notification ( did_change_watched_files ( _changes ) , state = % __MODULE__ { } ) do
491
+ # swallow notification if project_dir is not yet set
492
+ state
493
+ end
494
+
489
495
defp handle_notification ( % { "method" => "$/" <> _ } , state = % __MODULE__ { } ) do
490
496
# not supported "$/" notifications may be safely ignored
491
497
state
You can’t perform that action at this time.
0 commit comments