vscode-error-lens icon indicating copy to clipboard operation
vscode-error-lens copied to clipboard

Feature Request: Wrapping Text Decorator

Open douglance opened this issue 4 years ago • 9 comments

It would be great to wrap the text decoration somehow so scrolling isn't required to read a longer error.

douglance avatar Apr 11 '20 13:04 douglance

Same as #12 - There's simply no api to do that

usernamehw avatar Apr 13 '20 12:04 usernamehw

The upstream issue is probably this one https://github.com/microsoft/vscode/issues/32856

usernamehw avatar May 17 '20 19:05 usernamehw

@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 avatar Feb 22 '22 08:02 rami3l

@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 avatar Feb 22 '22 09:02 usernamehw

@usernamehw Thanks for you timely reply! I'm no expert, but here's what I've found...

  1. As per https://github.com/microsoft/vscode/issues/129673#issuecomment-888164529 it seems to me that those decorations can actually be wrapped.
  2. The function for associating Document Selectors with Inlay Hint Providers seems quite general, since it's not necessary to specify all the supported languages?
  3. 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.

rami3l avatar Feb 22 '22 09:02 rami3l

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)?

GitMensch avatar Sep 21 '22 05:09 GitMensch

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!

image

budivoogt avatar Sep 18 '23 17:09 budivoogt

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).

GitMensch avatar Sep 18 '23 18:09 GitMensch

That's helpful. I'll experiment with that!

budivoogt avatar Sep 19 '23 05:09 budivoogt