vscode-error-lens
vscode-error-lens copied to clipboard
Feature Request: Wrapping Text Decorator
It would be great to wrap the text decoration somehow so scrolling isn't required to read a longer error.
Same as #12 - There's simply no api to do that
The upstream issue is probably this one https://github.com/microsoft/vscode/issues/32856
@usernamehw Gentle reminder: https://github.com/microsoft/vscode/issues/16221#issuecomment-1033827087 is now closed, and the new VSCode inlay hints API are finalized, which might just be the necessary API to resolve this issue.
@rami3l I don't think that those decorations can be wrapped. It also looks like that api needs to be implemented per language? And it's also seems like the api has a specific purpose of showing info of parameter hints (function parameter names & return types).
@usernamehw Thanks for you timely reply! I'm no expert, but here's what I've found...
- As per https://github.com/microsoft/vscode/issues/129673#issuecomment-888164529 it seems to me that those decorations can actually be wrapped.
- The function for associating Document Selectors with Inlay Hint Providers seems quite general, since it's not necessary to specify all the supported languages?
- The category part in the API seems optional, consistent with the suggestion in https://github.com/microsoft/language-server-protocol/issues/956#issuecomment-611106048, so that new kinds of hints can be added.
Update: Indeed there are some discussions around the "less hack-y" usage of inlay hints in https://github.com/microsoft/language-server-protocol/issues/956#issuecomment-1154867250.
Do I read this correctly that "in theory" this feature request could now be implemented? Which vscode version would be required (this extension currently requires vscode engine 1.66)?
I'm a new Error Lens user and greatly enjoying the extension. However I'm running into the same issue where error decorators ignore word wrap and extend beyond the visible screen and don't wrap. Is there no remedy for this in the plugin or VSC config? Thanks!
Workaround: You can enable showing the error in the status bar, where you should be able to see it completely, as soon as you move your cursor into this line.
And yes: a word-wrap would be nice (but this would most likely mean that your line 21 takes multiple lines in the editor, so line 22 would visually be at least one line of).
That's helpful. I'll experiment with that!