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

Bug / Feature Request: Support for multiline errors #90

Closed
isaacabraham opened this issue Jun 11, 2021 · 5 comments
Closed

Bug / Feature Request: Support for multiline errors #90

isaacabraham opened this issue Jun 11, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@isaacabraham
Copy link

Some compilers e.g. F# commonly use multiline errors. I've tried using the removeLinebreaks setting but this does not help e.g.

This is the "full" error shown in the pop-up or error pane:

image

image

But the error lens shows just the first line:

image

If the extension simply discarded new lines and put the entire message on a single line, might that be a reasonable solution?

@usernamehw
Copy link
Owner

usernamehw commented Jun 19, 2021

If the extension simply discarded new lines and put the entire message on a single line, might that be a reasonable solution?

"errorLens.removeLinebreaks": true, - should do that - replace line breaks with whitespace and show it in one line.

Is message not showing because the editor run out of space or did the message stop before that?

@usernamehw
Copy link
Owner

usernamehw commented Jun 19, 2021

VSCode doesn't have api to show multi-line decorations.

If code inset (webview inside editor) was implemented it would be possible microsoft/vscode#85682

Or maybe this one microsoft/vscode#3220

@isaacabraham
Copy link
Author

@usernamehw Hi. As you can see from the screenshot above, unfortunately the removeLineBreaks option doesn't appear to help. There are some other errors I've seen that are all single lined and quite long, and this extension does indeed correctly show the entire message. It's just multiline errors that don't show on the single line, even with remove line breaks on.

@usernamehw
Copy link
Owner

usernamehw commented Jun 20, 2021

Perhaps tabs or carriage return. Could you try to install this version with modified regexp?

  1. Rename .zip to .vsix
  2. Install vsix

errorlens-3.2.7.zip

Or I can write how to modify installed extension:

  1. Execute from Command Palette Extensions: Open Extensions Folder
  2. Open extension file usernamehw.errorlens-3.2.7\dist\extension.js
  3. Replace regexp /\n/g with /[\n\r\t]+?/g
  4. Reload the editor (maybe twice)

@usernamehw usernamehw added the bug Something isn't working label Jun 26, 2021
@usernamehw
Copy link
Owner

I assume it worked.

usernamehw added a commit that referenced this issue Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants