-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
fix: set highlight group Subsitute #1983
Conversation
chore: remove the border of the custom highlights It will be strange when multiple decoration ranges with borders are connected.
Code_-_Insiders_RYU3vSr4BI.00_00_00-00_00_23.mp4 |
Hard to reproduce with #1976 |
-- But Search highlighting defaults to using VSCode ThemeColor, potentially with some opacity. | ||
-- When the decoration is "virtText", having a background color with opacity can | ||
-- cause the virtual text to blend with the original content. | ||
Substitute = { fg='#282c34', bg='#98c379' }, |
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.
Nice! We should offer a way to customize these colors if possible, though. I can imagine this color not showing very well on some light themes.
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.
Now it's possible, the setup_globals
will only execute once, and users can define it themselves, requiring some delay for custom highlighting. However, indeed, there is a need to provide a more conventional approach.
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.
Gotcha, I guess I was thinking of allowing it via our configuration, but init.vim works too
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.
One thing I noticed, though I figure we can't do much about this, given VSCode owns the buffer, is that any substitutions that exceed the length of the original match will visually write over text later in the line. In Neovim, the original text is visually removed when typing your substitution. Similarly (and this one I think we could fix), if your substitution exceeds the line length, it gets weirdly truncated. |
Merged, this PR has no side effects |
Should we not be using |
I originally used ThemeColor, but later found that the effect was not good vscode-neovim/runtime/lua/vscode-neovim/highlight.lua Lines 58 to 62 in c81e64d
|
Just don't link it to |
Sure. But now users can still set it in settings.json. If you want to add to this, that's fine with me. |
How would users do that now? I can guess how they might do it in |
|
chore: remove the border of the custom highlights
It will be strange when multiple decoration ranges with borders are connected.
inccommand
is not empty #1979