Skip to content

Commit 75ec61e

Browse files
committed
run formatter
1 parent 699a728 commit 75ec61e

File tree

2 files changed

+42
-16
lines changed

2 files changed

+42
-16
lines changed

apps/language_server/lib/language_server/cli.ex

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,24 +90,39 @@ defmodule ElixirLS.LanguageServer.CLI do
9090
def check_otp_doc_chunks() do
9191
if match?({:error, _}, Code.fetch_docs(:erlang)) do
9292
JsonRpc.show_message(:warning, "OTP compiled without EEP48 documentation chunks")
93-
Logger.warn("OTP compiled without EEP48 documentation chunks. Language features for erlang modules will run in limited mode. Please reinstall or rebuild OTP with approperiate flags.")
93+
94+
Logger.warn(
95+
"OTP compiled without EEP48 documentation chunks. Language features for erlang modules will run in limited mode. Please reinstall or rebuild OTP with approperiate flags."
96+
)
9497
end
9598
end
9699

97100
def check_elixir_sources() do
98-
enum_ex_path = Enum.module_info[:compile][:source]
101+
enum_ex_path = Enum.module_info()[:compile][:source]
102+
99103
unless File.exists?(enum_ex_path, [:raw]) do
100-
dir = Path.join(enum_ex_path, "../../../..") |> Path.expand
101-
Logger.notice("Elixir sources not found (checking in #{dir}). Code navigation to Elixir modules disabled.")
104+
dir = Path.join(enum_ex_path, "../../../..") |> Path.expand()
105+
106+
Logger.notice(
107+
"Elixir sources not found (checking in #{dir}). Code navigation to Elixir modules disabled."
108+
)
102109
end
103110
end
104111

105112
def check_otp_sources() do
106113
{_module, _binary, beam_filename} = :code.get_object_code(:erlang)
107-
erlang_erl_path = beam_filename |> to_string |> String.replace(Regex.recompile!(~r/(.+)\/ebin\/([^\s]+)\.beam$/), "\\1/src/\\2.erl")
114+
115+
erlang_erl_path =
116+
beam_filename
117+
|> to_string
118+
|> String.replace(Regex.recompile!(~r/(.+)\/ebin\/([^\s]+)\.beam$/), "\\1/src/\\2.erl")
119+
108120
unless File.exists?(erlang_erl_path, [:raw]) do
109-
dir = Path.join(erlang_erl_path, "../../../..") |> Path.expand
110-
Logger.notice("OTP sources not found (checking in #{dir}). Code navigation to OTP modules disabled.")
121+
dir = Path.join(erlang_erl_path, "../../../..") |> Path.expand()
122+
123+
Logger.notice(
124+
"OTP sources not found (checking in #{dir}). Code navigation to OTP modules disabled."
125+
)
111126
end
112127
end
113128
end

apps/language_server/lib/language_server/dialyzer/manifest.ex

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,31 @@ defmodule ElixirLS.LanguageServer.Dialyzer.Manifest do
1414
Task.start_link(fn ->
1515
watcher = self()
1616

17-
{pid, ref} = spawn_monitor(fn ->
18-
active_plt = load_elixir_plt()
19-
send(watcher, :plt_loaded)
20-
transfer_plt(active_plt, parent)
17+
{pid, ref} =
18+
spawn_monitor(fn ->
19+
active_plt = load_elixir_plt()
20+
send(watcher, :plt_loaded)
21+
transfer_plt(active_plt, parent)
2122

22-
Dialyzer.analysis_finished(parent, :noop, active_plt, %{}, %{}, %{}, nil, nil)
23-
end)
23+
Dialyzer.analysis_finished(parent, :noop, active_plt, %{}, %{}, %{}, nil, nil)
24+
end)
2425

2526
receive do
26-
:plt_loaded -> :ok
27+
:plt_loaded ->
28+
:ok
29+
2730
{:DOWN, ^ref, :process, ^pid, reason} ->
28-
JsonRpc.show_message(:error, "Unable to build dialyzer PLT. Most likely there are problems with your OTP and elixir installation.")
31+
JsonRpc.show_message(
32+
:error,
33+
"Unable to build dialyzer PLT. Most likely there are problems with your OTP and elixir installation."
34+
)
35+
2936
Logger.error("Dialyzer PLT build process exited with reason: #{inspect(reason)}")
30-
Logger.warn("Dialyzer support disabled. Most likely there are problems with your elixir and OTP installation. Visit https://github.com/elixir-lsp/elixir-ls/issues/540 for help")
37+
38+
Logger.warn(
39+
"Dialyzer support disabled. Most likely there are problems with your elixir and OTP installation. Visit https://github.com/elixir-lsp/elixir-ls/issues/540 for help"
40+
)
41+
3142
# NOTE We do not call Dialyzer.analysis_finished. LS keeps working and building normally
3243
# only dialyzer is not being triggered after every build
3344
end

0 commit comments

Comments
 (0)