Closed LinqLover closed 3 years ago
I understand the problem, but it is really hard to find a good compromise.
Any suggestions how to fix this (@misolori)?
Always style these previews in italic font?
An alternative would be to use a different color as this really depends on each theme, do we have a color token for the suggest preview text?
An alternative would be to use a different color as this really depends on each theme, do we have a color token for the suggest preview text?
Yes! There is editorGhostText.foreground
and editorGhostText.border
Here is another UX drawback I experienced in connection with inline previews: Spaces that are part of a suggestion are not distinguishable from real spaces in the file.
For example, in this file using the Latex Workshop extension:
The space is part of the suggestion. If I press arrow + right in this situation, the space will suddenly disappear which caused confusion for me. Maybe this could also be improved, e.g., by using some kind of underscore or background styling for spaces in the ghost style?
@LinqLover thanks for the screenshot! So the line content of the file on disk is actually just \itemIn
?
@hediet Very exactly.
I think there are two options:
Italicize the suggest preview, this would align with the inline suggestions in autocomplete changes:
Adjust the color of the ghost text. This one would be on a per-theme basis and depend on the comment color token, but it leaves a less-desirable look:
Italic looks better to me. Is there a risk that certain themes or language extensions might italicize text as well?
Just in the same way that there will be themes that conflict with the colors of ghost text, the same can happen for text so it is a possibility. I think it comes down to how likely users are to run into these issues and if it warrants a fix.
Italicize the suggest preview, this would align with the inline suggestions in autocomplete changes
And then you would make the preview of the inline suggestion when the suggest widget is shown non-italic?
@hediet I was wondering whether it would make sense for the ghost text to always be italicized except when there are inline suggestions, so that there is less differences between these two states:
what do you think?
I think that makes sense. It would basically swap italic ghost text with non-italic ghost text.
Thank you for fixing this! :-)
What is about the indistinguishable whitespace from suggestions (see https://github.com/microsoft/vscode/issues/132852#issuecomment-918106411)? Shall I open a new issue for this?
Yes please! Please ping me in the issue.
Does this issue occur when all extensions are disabled?: No
Steps to Reproduce:
editor.suggest.preview
At the beginning of a non-empty line, type a
#
:Unfortunately, there is no difference in the representation of the actual line (
#exit 2
) and the suggestion preview (#75
). Different colors or text styles should be used.While I reproduced this issue together with two extensions only, I have the impression that this might be a general issue with this setting since VS Code does not make sure the display format for suggestion previews is unique.