neoclide/coc.nvim

Remove ansi escape sequence from code lens

sevenc-nanashi opened this issue · 2 comments

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)

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

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

} else if (foreground) {
let hlGroup: string
if (markdown) {
if (foreground == 'yellow') {
hlGroup = 'CocMarkdownCode'
} else if (foreground == 'blue') {
hlGroup = 'CocMarkdownLink'
} else if (foreground == 'magenta') {
hlGroup = 'CocMarkdownHeader'
} else {
hlGroup = `CocListFg${upperFirst(foreground)}`
}
} else {
hlGroup = `CocListFg${upperFirst(foreground)}`
}
highlights.push({ span, hlGroup })

#5077 may help.