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

Remove ansi escape sequence from code lens #5075

Closed
sevenc-nanashi opened this issue Jul 7, 2024 · 2 comments · Fixed by #5077
Closed

Remove ansi escape sequence from code lens #5075

sevenc-nanashi opened this issue Jul 7, 2024 · 2 comments · Fixed by #5077

Comments

@sevenc-nanashi
Copy link

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
Copy link
Member

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

@hexh250786313
Copy link
Contributor

hexh250786313 commented Jul 8, 2024

@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.

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

Successfully merging a pull request may close this issue.

3 participants