Skip to content

Commit ae40661

Browse files
committed
do not consider changes in .elixir-ls and _build dirs when deciding id rebuild is necessary
Fixes #686
1 parent c1a9a5f commit ae40661

File tree

1 file changed

+5
-1
lines changed
  • apps/language_server/lib/language_server

1 file changed

+5
-1
lines changed

apps/language_server/lib/language_server/server.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,11 @@ defmodule ElixirLS.LanguageServer.Server do
407407
Enum.any?(changes, fn %{"uri" => uri = "file:" <> _, "type" => type} ->
408408
path = SourceFile.path_from_uri(uri)
409409

410-
Path.extname(path) in (additional_watched_extensions ++ @default_watched_extensions) and
410+
relative_path = Path.relative_to(path, state.project_dir)
411+
first_path_segment = relative_path |> Path.split() |> hd
412+
413+
first_path_segment not in [".elixir_ls", "_build"] and
414+
Path.extname(path) in (additional_watched_extensions ++ @default_watched_extensions) and
411415
(type in [1, 3] or not Map.has_key?(state.source_files, uri) or
412416
state.source_files[uri].dirty?)
413417
end)

0 commit comments

Comments
 (0)