Skip to content

Commit

Permalink
add support for disabling automatic builds trough a config
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanspagh committed May 2, 2022
1 parent 7f37d59 commit ea30d2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/language_server/lib/language_server/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -912,11 +912,12 @@ defmodule ElixirLS.LanguageServer.Server do
# Build

defp trigger_build(state = %__MODULE__{project_dir: project_dir}) do
build_automatically = Map.get(state.settings || %{}, "autoBuild", true)
cond do
not build_enabled?(state) ->
state

not state.build_running? ->
not state.build_running? and build_automatically ->
fetch_deps? = Map.get(state.settings || %{}, "fetchDeps", false)

{_pid, build_ref} =
Expand Down

0 comments on commit ea30d2c

Please sign in to comment.