neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.37k stars 956 forks source link

Remove ansi escape sequence from code lens #5075

Closed sevenc-nanashi closed 2 months ago

sevenc-nanashi commented 3 months ago

Is your feature request related to a problem? Please describe. coc-pretty-ts-errors uses ansi escape for error messages, but ansi escape sequences in these messages are shown in code lens, and it makes difficult to read error messages via code lens: image

Describe the solution you'd like Remove ansi escape sequences.

Describe alternatives you've considered (None)

Additional context (None)

fannheyward commented 2 months ago

Hello @hexh250786313 , can you take a look at this? Does the ansi character added by the extension?

hexh250786313 commented 2 months ago

@fannheyward Yes. Cause I haven't found another good way to highlight the specific inline code in coc markdown parser.

https://github.com/neoclide/coc.nvim/blob/16dfda7da592c0568302be0028363a83fbab9511/src/util/ansiparse.ts#L66-L81

https://github.com/neoclide/coc.nvim/pull/5077 may help.