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

Italics not reset for diagnostics text #2856

Closed
mtoohey31 opened this issue Jun 22, 2022 · 4 comments · Fixed by #2861 or #2900
Closed

Italics not reset for diagnostics text #2856

mtoohey31 opened this issue Jun 22, 2022 · 4 comments · Fixed by #2861 or #2900
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@mtoohey31
Copy link
Contributor

Summary

When language server diagnostic summary text is rendered on the screen in a spot where the file's text is italicized due to syntax highlighting, the diagnostic text is also italicized.

This screenshot demonstrates the issue:

2022-06-21T22:07:28,186693692-04:00

The words "not enough" in the diagnostics text are italicized, but the rest of the line isn't.

Reproduction Steps

I tried this:

  1. hx <filename> (with language server active)
  2. Position window/cursor so diagnostics appear overlapping text that is italicized.

config.toml:

theme = "base16_terminal_kitty"
themes/base16_terminal_kitty.toml:
# Authors: NNB <[email protected]>, Matthew Toohey <[email protected]>

"ui.menu" = { fg = "light-gray", bg = "opaque-black" }
"ui.menu.selected" = { modifiers = ["reversed"] }
"ui.linenr" = { fg = "gray", bg = "black" }
"ui.popup" = { bg = "opaque-black" }
"ui.window" = { bg = "opaque-black" }
"ui.linenr.selected" = { fg = "white", bg = "black", modifiers = ["bold"] }
"ui.selection" = { fg = "black", bg = "blue" }
"ui.selection.primary" = { fg = "white", bg = "blue" }
"comment" = { fg = "gray", modifiers = ["italic"] }
"ui.statusline" = { fg = "white", bg = "opaque-black" }
"ui.statusline.inactive" = { fg = "gray", bg = "opaque-black" }
"ui.help" = { fg = "white", bg = "opaque-black" }
"ui.cursor" = { fg = "light-gray", modifiers = ["reversed"] }
"ui.cursor.primary" = { fg = "light-gray", modifiers = ["reversed"] }
"ui.virtual" = "light-gray"
"variable" = "light-red"
"constant.numeric" = "yellow"
"constant" = "yellow"
"attributes" = "yellow"
"type" = "light-yellow"
"ui.cursor.match" = { fg = "light-yellow", modifiers = ["underlined"] }
"string"  = "light-green"
"variable.other.member" = "light-green"
"constant.character.escape" = "light-cyan"
"function" = "light-blue"
"constructor" = "light-blue"
"special" = "light-blue"
"keyword" = "light-magenta"
"label" = "light-magenta"
"namespace" = "light-magenta"

"markup.heading" = "light-blue"
"markup.list" = "light-red"
"markup.bold" = { fg = "light-yellow", modifiers = ["bold"] }
"markup.italic" = { fg = "light-magenta", modifiers = ["italic"] }
"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] }
"markup.link.text" = "light-red"
"markup.quote" = "light-cyan"
"markup.raw" = "light-green"

"diff.plus" = "light-green"
"diff.delta" = "yellow"
"diff.minus" = "light-red"

"diagnostic" = { modifiers = ["underlined"] }
"ui.gutter" = { bg = "black" }
"info" = "light-blue"
"hint" = "gray"
"debug" = "gray"
"warning" = "yellow"
"error" = "light-red"

[palette]
opaque-black = "#000000"

I expected this to happen:

  • None of the diagnostics text should be italicized.

Instead, this happened:

  • Part of the diagnostics text, up until the underlying italicized text ends, is italicized.

Helix log

N/A

Platform

Linux

Terminal Emulator

kitty 0.25.1

Helix Version

22.05-55-gd7bd4416

@mtoohey31 mtoohey31 added the C-bug Category: This is a bug label Jun 22, 2022
@the-mikedavis the-mikedavis added the A-helix-term Area: Helix term improvements label Jun 22, 2022
@archseer
Copy link
Member

Seems like this has a problem: it strips all styling including the document background color, leaving a black background on the diagnostic.

@the-mikedavis
Copy link
Member

@sbromberger ☝️

It looks like we'll either want to merge in the background from whatever scope in the theme is providing it (ui.background I think?) or ideally only reset the modifiers instead of an overall reset.

@sbromberger
Copy link
Contributor

oh, crud. Sorry about that. (My background is black so I didn't notice.) Let me see what I can do.

@sbromberger
Copy link
Contributor

please test #2900. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants