Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: vscode displaying literal ansi color code on windows #29

Closed
sloxy opened this issue May 2, 2018 · 5 comments
Closed

BUG: vscode displaying literal ansi color code on windows #29

sloxy opened this issue May 2, 2018 · 5 comments

Comments

@sloxy
Copy link

sloxy commented May 2, 2018

Bug report coming from conversation in #vscode in clojurians slack on April 28/29/30.

When evaluating code in VSCode, ansi color codes are printed in terminal.

For example, instead of just outputting nil, it will output ?[36mnil?[0m
vscode-nrel-ansi-codes-in-terminal-output

In other (Windows) clients which use lein repl which support color output in terminal, the response text would be colorized correctly(with the ansi color information then removed after use).
Noticable, issue seems to be fundamental to Windows as cmd.exe, Powershell & VSCode terminal all suffer from this issue,

image

##Other Info
similar to clojure-emacs/cider#275 which was solved client side.

@pedrorgirardi
Copy link
Contributor

Thanks for taking the time to report, @sloxy . We will see what we can do. :)

@sloxy
Copy link
Author

sloxy commented May 2, 2018

using rebel-readline & the instructions from https://github.com/clojure/tools.nrepl/blob/master/README.md, this is what the nrepl server responds with:

image

@sloxy
Copy link
Author

sloxy commented May 2, 2018

cider-nrepl uses puget.printer (cider-nrepl\src\cider\nrepl\middleware\pprint.clj:35) and it doesn't override the default value of print-color which is set to false (puget/printer.clj:99): :print-color false
so looks like this isn't adding the ansi code to the return value either:

image

@PEZ
Copy link
Collaborator

PEZ commented May 2, 2018

This could be related: microsoft/vscode#45693

@sloxy
Copy link
Author

sloxy commented May 3, 2018

found issue.
i had :plugins [[venantius/ultra "0.5.2"]] in my leiningen profile..

removing that resolved issue:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants