usernamehw / vscode-error-lens

VSCode extension that enhances display of errors and warnings.
https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens
MIT License
601 stars 32 forks source link

Explore showing multiline decorations #181

Open usernamehw opened 1 year ago

usernamehw commented 1 year ago

Try finding a space to fit as much text as possible (Tetris).

Whether it's a very long single line problem, or a multiline problem => find the best empty box to fit it (using multiple single line decorations).

multiline_demo



How to enable and configure experimental version:

"errorLens.followCursor": "closestProblemMultiline",
"errorLens.multilineMessage": {
    "decorationMaxNumberOfLines": 4,
    "preferFittingMessageMultiplier": 2,
    "highlightProblemLine": "line",
    "alignStart": 0,
    "alignEnd": 0,
    "margin": 4,
    "padding": 1,
    "borderRadius": "",
    "useFixedPosition": true,
},
goyalyashpal commented 1 year ago

hi! thanks for such a wonderful extension and including this on open-vsx too.

is this issue just about showing single but long diagnostic line or would also cover multiple diagnostic messages for same line??

e.g.:

Syntax error, insert "VariableDeclarators" to complete LocalVariableDeclaration [21:17]
Syntax error, insert ";" to complete LocalVariableDeclarationStatement [21:17]

image

image

image