Closed lyy4758 closed 6 months ago
Hey, I'm facing the same issue. Were you able to solve the issue, or just accepted it?
Hey, I'm facing the same issue. Were you able to solve the issue, or just accepted it?
You can set console = "integratedTerminal"
in your configuration to have it run in a real terminal that supports color codes.
If you don't want to run it in an integrated terminal you could try setting a NO_COLOR=1
environment variable. Most sane apps honor that flag (see http://no-color.org/)
That said, I'd be open to change the output processing and strip out color codes for the REPL
Another option could be using chrisbra/Colorizer
The following code is working for me on vscode-js-debug
DAP (which doesn't have an "integratedTerminal" option in request=launch type=pwa-chrome).
return {
"chrisbra/Colorizer",
lazy = false,
init = function()
vim.g.colorizer_auto_filetype = "dap-repl"
vim.g.colorizer_disable_bufleave = 1
vim.api.nvim_create_autocmd("FileType", {
desc = "Force colorize on dap-repl",
pattern = "dap-repl",
group = vim.api.nvim_create_augroup("auto_colorize", { clear = true }),
callback = function() vim.cmd("ColorHighlight!") end,
})
end,
}
Debug adapter definition and debug configuration
Debug adapter version
No response
Steps to Reproduce
1.Open a Python file in Neovim. 2.Set up a breakpoint in the file by placing :DapBreakpoint on the desired line. 3.Start the debugging session by running :DapContinue.
Expected Result
"With this feature, when a script outputs colored text (using ANSI color codes), the nvim-dap REPL should display these colors. For example, error messages could appear in red, warnings in yellow, etc., similar to how they are displayed in a standard terminal."
Actual Result
"Currently, the nvim-dap REPL displays all text in monochrome. ANSI color codes are either stripped or displayed as raw text, which can be hard to read and interpret."![image](https://github.com/mfussenegger/nvim-dap/assets/29500263/1aa7949a-1e3a-4c25-8a56-0baef4909067)