Skip to content

Commit 0b9fec1

Browse files
committed
enable ANSI colors in debug adapter
the output looks correctly in recent VSCode Fixes elixir-lsp/vscode-elixir-ls#422
1 parent 9cd1937 commit 0b9fec1

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

apps/debug_adapter/lib/debug_adapter.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ defmodule ElixirLS.DebugAdapter do
77
Application.load(:erts)
88
Application.put_env(:elixir, :ansi_enabled, false)
99
WireProtocol.intercept_output(&Output.debuggee_out/1, &Output.debuggee_err/1)
10+
Application.put_env(:elixir, :ansi_enabled, true)
1011
Launch.start_mix()
1112

1213
if Version.match?(System.version(), ">= 1.15.0-dev") do

apps/debug_adapter/lib/debug_adapter/server.ex

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,9 +1730,6 @@ defmodule ElixirLS.DebugAdapter.Server do
17301730
Mix.Task.run("loadconfig")
17311731
end
17321732

1733-
# make sure ANSI is disabled
1734-
Application.put_env(:elixir, :ansi_enabled, false)
1735-
17361733
unless "--no-compile" in task_args or "--no-mix-exs" in task_args do
17371734
case Mix.Task.run("compile", ["--ignore-module-conflict", "--return-errors"]) do
17381735
{:error, diagnostics} ->

0 commit comments

Comments
 (0)