-
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
ability to disable document_highlight_style on multiline string blocks #2246
Comments
Hello, In the image I see the region being drawn as an outline. I would guess that the region is caused by a diagnostic hint, so my best guess for now would be to suggest the following settings. See what works for you: 1.Try to set
|
Those are really "DocumentHighlights", not diagnostics. It intentionally uses the outline if the range spans multiple lines, see 940c918. I remember that the CSS server also used to use multi-line highlights for whole selector blocks, but AFAICT it doesn't do that anymore. I would not be against adding the ability to configure the style for multi-line highlights, but personally I also don't need it, because I use the "background" option, which doesn't have the outline for multi-line highlight regions. So I will keep out of the decision whether to add a new setting for this. In fact, I would even suggest to make "background" the only possible style and remove the setting alltogether, if Sublime's default style for the |
LSP TypeScript, a js file with the following code. Seems to me is highlighted when the string is a function parameter. Anyway, doesn't matter where the string is, if it is multiline, I would prefer to not have the full block highlighted. Is really not helpful and very distracting. About the something(
`somethign something`,
"something something",
"something something",
`
it
highlights
the
full
block
here
`
);
|
I was just referring to the For the underlines, it was like that before, and there is a screenshot in #1710 (comment) about how that looks. But feel free to prepare a PR or wait for more opinions, if this style should be added back as an option. |
There I sent a pull request adding a new preference #2247 |
I've had LSP-typescript running on my project for weeks, but I never noticed this document highlighting until today; coincidentally when I installed several other plugins. I drove myself crazy trying to fix it; I'm certain this functionality wasn't working for me before. In any case, I strongly believe this should not be a default behavior in LSP. Discoverability was extremely poor; I had to disable every single Sublime plugin, one-by-one, to find out what was causing these outlines on multi-line strings. And it's really quite ugly for most (all?) color schemes. If someone modifies their color scheme to work with this, they probably know enough to turn on the setting. It just really does not seem useful to me. To aid anyone else searching: This is not related to BracketHighlighter, RainbowBrackets, or any sublime settings to match or highlight the contents of bracket contents. It is not related to The cause of this border or outline on sublime text multi-line strings in Javascript or Typescript using template literal string backticks is LSP documentHighlight, which can be discovered by running the command "LSP: Toggle Log Panel". |
Unless Im mistaken, it seems to me that
document_highlight_style
is causing multiline string to have a full border, which is very distracting.I have searched and couldn't find a way to disable highlighting for multiline strings. Could be possible to add a preference to avoid this?
The text was updated successfully, but these errors were encountered: