scalameta / metals

Scala language server with rich IDE features 🚀
https://scalameta.org/metals/
Apache License 2.0
2.07k stars 325 forks source link

Lenses "jump" on refresh? #5965

Open altrack opened 8 months ago

altrack commented 8 months ago

Describe the bug

https://discord.com/channels/632642981228314653/632841682211045396/1186806811739820173 Hey, is it possible to make lenses (like run/debug/goto) to work fluidly? With the current version, when file changes, the refresh removes the link, then adds it back. During this process the entire code jumps up/down.

To Reproduce Steps to reproduce the behavior:

Shown in the video.

https://github.com/scalameta/metals-vscode/assets/120270537/9cfcf74d-972d-4ece-9402-fad11e752eac

Expected behavior

Expecting the the code not to move every time the code is changes.

tgodzik commented 8 months ago

Thanks for reporting! We should make sure that we don't send empty lenses when waiting for compilation. And since this uses semanticdb, ideally they should not disappear.