Skip to content
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

Feature Request: Wrapping Text Decorator #47

Open
douglance opened this issue Apr 11, 2020 · 9 comments
Open

Feature Request: Wrapping Text Decorator #47

douglance opened this issue Apr 11, 2020 · 9 comments
Labels
upstream Out of scope of this repo

Comments

@douglance
Copy link

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

@usernamehw
Copy link
Owner

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

@usernamehw
Copy link
Owner

The upstream issue is probably this one microsoft/vscode#32856

@rami3l
Copy link

rami3l commented Feb 22, 2022

@usernamehw Gentle reminder: microsoft/vscode#16221 (comment) is now closed, and the new VSCode inlay hints API are finalized, which might just be the necessary API to resolve this issue.

@usernamehw
Copy link
Owner

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

@rami3l
Copy link

rami3l commented Feb 22, 2022

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

  1. As per Long inlay hints aren't wrapped microsoft/vscode#129673 (comment) 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 Feature: Inlay Hints microsoft/language-server-protocol#956 (comment), 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 microsoft/language-server-protocol#956 (comment).

@GitMensch
Copy link

GitMensch commented Sep 21, 2022

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

@budivoogt
Copy link

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

@GitMensch
Copy link

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

@budivoogt
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Out of scope of this repo
Projects
None yet
Development

No branches or pull requests

5 participants