-
Notifications
You must be signed in to change notification settings - Fork 185
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
Use box-style for multiline doc highlights #1712
Conversation
The comment above the |
In |
Still not addressed. And also:
Otherwise looks very good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect
I am very surprised with this change. I would be totally fine with changing the default to I do not like |
Thanks for actually looking at possible customization points. The vast majority of users don't actually do that. We traded settings-maintenance-burden complexity with overall better default behavior here. This project is maintained by volunteers in their free time so if you really need What you can also do is use So for instance for my Mariana color scheme I have this override file: {
"rules": [
{
"scope": "markup.error",
"foreground": "hsl(357, 79%, 65%)"
},
{
"scope": "markup.warning",
"foreground": "hsl(32, 93%, 66%)"
},
{
"scope": "markup.info",
"foreground": "hsl(0, 0%, 100%)"
},
{
"scope": "markup.info.hint",
"foreground": "hsl(0, 0%, 97%)"
},
{
"scope": "markup.highlight.text",
"background": "color(var(white2) alpha(0.2))"
},
{
"scope": "markup.highlight.read",
"background": "color(var(green) alpha(0.2))"
},
{
"scope": "markup.highlight.write",
"background": "color(var(red2) alpha(0.2))"
},
{
"scope": "markup.unnecessary.lsp",
"foreground": "color(rgb(255, 255, 255) alpha(0.4))",
"background": "color(var(blue3) alpha(0.9))"
}
],
} resulting in: See: https://lsp.sublimetext.io/customization/#document-highlights |
Thanks, yep totally with you on the burdens of open source. Doesn't look like I can do a stippled line via a color scheme override, so I'll have to maintain my own git patch. Thanks for all your work! |
You could for example set the underline color to 50% opacity via "foreground" in the color scheme rule, then it doesn't look much different from the dotted style: But I must say I actually considered to suggest keeping the "stippled" style option when I saw this PR, but then I changed my mind because I don't need it personally and the default has been "underline" even before iirc. I guess the motivation was that "stippled" is now used for the diagnostics with severity However, the "settings maintenance burden" is only two lines of code (plus re-adding that option in the settings description and .sublime-package schema). Maybe it's reasonable to keep that style option? diff --git a/plugin/core/types.py b/plugin/core/types.py
index 49fdd3b..512bdcb 100644
--- a/plugin/core/types.py
+++ b/plugin/core/types.py
@@ -235,6 +235,8 @@ class Settings:
def document_highlight_style_region_flags(self) -> Tuple[int, int]:
if self.document_highlight_style == "fill":
return sublime.DRAW_NO_OUTLINE, sublime.DRAW_NO_OUTLINE
+ elif self.document_highlight_style == "stippled":
+ return sublime.DRAW_NO_FILL, sublime.DRAW_NO_FILL | sublime.DRAW_NO_OUTLINE | sublime.DRAW_STIPPLED_UNDERLINE
else:
return sublime.DRAW_NO_FILL, sublime.DRAW_NO_FILL | sublime.DRAW_NO_OUTLINE | sublime.DRAW_SOLID_UNDERLINE |
Yep I get that. But 99% of the time, I place my cursor under a symbol to get a feeling of other symbols around it. That overshadows my workflow far more than the times I need diagnostics for info and hint. (And if needed, I'd want to be able to customize it).
I'd really like that. However, I think I might fall into the 1% here, so I'd let you guys take the call. Thanks for pasting the snippet btw! |
I'd like to add myself to the 1% here, it was kinda confusing and disappointing to see those appearance customization options disappeared. |
Related: #1710
I've removed the "squiggly", "dotted" and "box" options for single-line highlights. "fill" and "underline" are possible. When set to "fill", "fill" is used for multi-line as well.