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

Bug: errorLens.alignMessage doesn't work with inlay hints #185

Closed Jonas1312 closed 1 year ago

Jonas1312 commented 1 year ago

Hi,

Thanks for the feature!

However, it doesn't work well with python.analysis.inlayHints settings

https://github.com/usernamehw/vscode-error-lens/assets/15847892/f8921f6b-7464-4c47-9deb-3bdb79ebb65d

usernamehw commented 1 year ago

There's no official api for alignment, so it's a hack already.

I've added a boolean property "useFixedPosition" to "errorLens.alignMessage" setting that uses a different hack. It removes stuttering on active line (when typing) and ignores things like inlayHints.

The drawback is that it will conflict with other extension decorations and if inlayHint is long it will also overlap with line text. So, only useful if you align messages far away from the code. This feature is unlikely to receive anything better.