@@ -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
@@ -167,22 +168,20 @@ defmodule ElixirLS.LanguageServer.Providers.Formatting do
167
168
168
169
case opts_result do
169
170
{ :ok , opts } ->
170
- IO . puts ( "[ElixirLS FormattingCache] Formatter building cache" )
171
+ JsonRpc . log_message ( :info , "[ElixirLS Formatting] Building cache... " )
171
172
populate_cache ( dir , state . format_table , opts )
172
- IO . puts ( "[ElixirLS FormattingCache] Formatter cache built" )
173
+ JsonRpc . log_message ( :info , "[ElixirLS Formatting] Cache built. " )
173
174
174
175
:error ->
175
- IO . puts (
176
- "[ElixirLS FormattingCache] Formatter cache will not be built: unable to handle formatter opts"
176
+ JsonRpc . log_message ( :info ,
177
+ "[ElixirLS Formatting] Cache will not be built: unable to handle formatter opts"
177
178
)
178
179
end
179
180
180
181
{ :reply , :ok , % { state | project_dir: dir , formatter_opts: opts_result } }
181
182
end
182
183
183
184
defp populate_cache ( project_dir , ets , opts ) do
184
- IO . puts ( "formatting cache with #{ inspect ( opts ) } " )
185
-
186
185
if inputs = opts [ :inputs ] do
187
186
inputs
188
187
|> Stream . flat_map ( fn glob ->
0 commit comments