@@ -23,6 +23,7 @@ defmodule ElixirLS.LanguageServer.Providers.Formatting do
23
23
]
24
24
25
25
import ElixirLS.LanguageServer.Protocol , only: [ range: 4 ]
26
+ alias ElixirLS.LanguageServer.JsonRpc
26
27
alias ElixirLS.LanguageServer.SourceFile
27
28
28
29
def build_cache ( root_uri ) do
@@ -159,22 +160,20 @@ defmodule ElixirLS.LanguageServer.Providers.Formatting do
159
160
160
161
case opts_result do
161
162
{ :ok , opts } ->
162
- IO . puts ( "[ElixirLS FormattingCache] Formatter building cache" )
163
+ JsonRpc . log_message ( :info , "[ElixirLS Formatting] Building cache... " )
163
164
populate_cache ( dir , state . format_table , opts )
164
- IO . puts ( "[ElixirLS FormattingCache] Formatter cache built" )
165
+ JsonRpc . log_message ( :info , "[ElixirLS Formatting] Cache built. " )
165
166
166
167
:error ->
167
- IO . puts (
168
- "[ElixirLS FormattingCache] Formatter cache will not be built: unable to handle formatter opts"
168
+ JsonRpc . log_message ( :info ,
169
+ "[ElixirLS Formatting] Cache will not be built: unable to handle formatter opts"
169
170
)
170
171
end
171
172
172
173
{ :reply , :ok , % { state | project_dir: dir , formatter_opts: opts_result } }
173
174
end
174
175
175
176
defp populate_cache ( project_dir , ets , opts ) do
176
- IO . puts ( "formatting cache with #{ inspect ( opts ) } " )
177
-
178
177
if inputs = opts [ :inputs ] do
179
178
inputs
180
179
|> Stream . flat_map ( fn glob ->
0 commit comments