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

LspRestart causes an abnormal client list #75

Open
timlee1128 opened this issue Aug 15, 2023 · 8 comments · Fixed by #76
Open

LspRestart causes an abnormal client list #75

timlee1128 opened this issue Aug 15, 2023 · 8 comments · Fixed by #76
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@timlee1128
Copy link

timlee1128 commented Aug 15, 2023

I really enjoy using this plugin; it's very useful, and I appreciate the efforts of the author. However, recently I've encountered an issue. Sometimes I need to switch Python environments, and during this process, “LspRestart” gets executed.

"LspRestart" will result in new clients being created. Only by selecting the last client can it work properly, and the other clients should not appear.

Below is an example of a tsserver restart:
image
When I select the first client, NavBuddy doesn't respond at all.
Here is my configuration:
{ "SmiteshP/nvim-navbuddy", dependencies = { { "SmiteshP/nvim-navbuddy", dependencies = { "SmiteshP/nvim-navic", "MunifTanjim/nui.nvim" }, opts = { lsp = { auto_attach = true, }, window = { position = { col = '50%', row = '27%' }, size = "30%", sections = { left = { size = '25%' }, mid = { size = '50%' }, right = { size = '25%', preview = 'never' } } } } } } },

@timlee1128 timlee1128 changed the title LspRestart LspRestart causes an abnormal client list Aug 15, 2023
@SmiteshP
Copy link
Owner

Aah I see, we need to somehow detect and detach from the old lsp server 🤔

@SmiteshP SmiteshP added enhancement New feature or request help wanted Extra attention is needed labels Aug 15, 2023
@litoj
Copy link

litoj commented Aug 22, 2023

I am not sure if this is fixed entirely - refreshing the buffer causes this:
obrazek

(I refreshed it twice - each refresh duplicates the entry)

@SmiteshP
Copy link
Owner

By refreshing buffer, what do you mean?

@SmiteshP SmiteshP reopened this Aug 26, 2023
@timlee1128
Copy link
Author

timlee1128 commented Aug 26, 2023 via email

@SmiteshP
Copy link
Owner

Reopening the same buffer with :e doesn't cause this issue for me 🤔
@timlee1128 Are you able to reproduce this?

@litoj
Copy link

litoj commented Aug 26, 2023

I use :e, yes. It happens to me independantly of the language server used.

@SmiteshP
Copy link
Owner

SmiteshP commented Sep 1, 2023

@JosefLitos Can you check if it still occurs on latest master? A few commits have been added that might have fixed this issue

@litoj
Copy link

litoj commented Sep 1, 2023

Oh, yeah, it totally works. I thought this was closed together with the commit already :D
Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants