nvim-metals icon indicating copy to clipboard operation
nvim-metals copied to clipboard

Duplicated code lenses when you restart Metals

Open ckipp01 opened this issue 2 years ago • 1 comments

Describe the bug

When using the :MetalsRestartMetals command while being in a file that has code lenses you end up with duplicated lenses. For example when doing this in a test file a couple times I end up seeing this:

Screenshot 2023-10-04 at 15 32 27

I'm not sure if this is an issue with Neovim, or why exactly this is happening. One solution could just be that we clear the code lenses when a user uses this command, but I feel like that shouldn't be necessary. I checked and Metals isn't sending duplicates so it's like an old state is still there.

Expected behavior

I'd expect that when the client stops, the code lenses go away.

Operating system

macOS

Version of Metals

1.0.1+73-dfa965e9-SNAPSHOT

ckipp01 avatar Oct 04 '23 13:10 ckipp01

Actually it seems like this is fixed in https://github.com/neovim/neovim/pull/24903, but needs to wait until the next release.

ckipp01 avatar Oct 04 '23 13:10 ckipp01