File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed
apps/language_server/lib/language_server Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ExpandMacro do
31
31
|> Macro . camelize ( )
32
32
|> String . replace ( "Expand" , "expand" )
33
33
34
- formatted = value |> Code . format_string! ( ) |> List . to_string ( )
34
+ formatted = value |> Code . format_string! ( ) |> IO . iodata_to_binary ( )
35
35
{ key , formatted <> "\n " }
36
36
end )
37
37
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ defmodule ElixirLS.LanguageServer.Providers.Hover do
280
280
defp format_header ( text ) do
281
281
text
282
282
|> Code . format_string! ( line_length: 40 )
283
- |> to_string
283
+ |> IO . iodata_to_binary ( )
284
284
rescue
285
285
_ ->
286
286
# Code.format_string! can raise SyntaxError e.g.
Original file line number Diff line number Diff line change @@ -222,7 +222,6 @@ defmodule ElixirLS.LanguageServer.SourceFile do
222
222
case format_code ( spec , line_length: line_length ) do
223
223
{ :ok , code } ->
224
224
code
225
- |> to_string ( )
226
225
227
226
{ :error , _ } ->
228
227
spec
@@ -322,7 +321,7 @@ defmodule ElixirLS.LanguageServer.SourceFile do
322
321
323
322
defp format_code ( code , opts ) do
324
323
try do
325
- { :ok , Code . format_string! ( code , opts ) }
324
+ { :ok , Code . format_string! ( code , opts ) |> IO . iodata_to_binary ( ) }
326
325
rescue
327
326
e ->
328
327
{ :error , e }
You can’t perform that action at this time.
0 commit comments