SmiteshP / nvim-navbuddy

A simple popup display that provides breadcrumbs feature using LSP server
Apache License 2.0
762 stars 30 forks source link

LspRestart causes an abnormal client list #75

Open timlee1128 opened 1 year ago

timlee1128 commented 1 year ago

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' } } } } } } },

SmiteshP commented 1 year ago

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

litoj commented 1 year ago

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 commented 1 year ago

By refreshing buffer, what do you mean?

timlee1128 commented 1 year ago

maybe :e

------------------ Original ------------------ From: Smitesh Patil @.> Date: Sat,Aug 26,2023 1:37 PM To: SmiteshP/nvim-navbuddy @.> Cc: Tim Lee @.>, Author @.> Subject: Re: [SmiteshP/nvim-navbuddy] LspRestart causes an abnormal clientlist (Issue #75)

By refreshing buffer, what do you mean?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

SmiteshP commented 1 year ago

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

litoj commented 1 year ago

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

SmiteshP commented 1 year ago

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

litoj commented 1 year ago

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