-
Notifications
You must be signed in to change notification settings - Fork 12
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
Issue with indirect buffers #30
Comments
It's a server-specific behaviour, but yes that's probably what's happening.
Understood.
I think it's a start, can you make it a PR? I don't understand why you have to check "base visible". What's visibility got to do with anything? Are you trying to use "base visible" as a proxy for something else, like "base recently request computed imenu-buffer-alist itself"? |
Sure.
Yes. If a base buffer is visible then it will compute |
It is done to assure that imenu is updated only once for all indirect buffers. * breadcrumb.el (bc--ipath-alist): switch to base buffer.
Hi, thank you for this package.
I've recently started using this package and noticed occasional freezes for 10 seconds when working with indirect buffers.
I've tracked it down to an imenu update that is launched in the idle timer from
bc--ipath-alist
.My setup: Emacs-30.0.50, imenu is powered by lsp-mode, lsp-server: pyright 1.1.325
So, when you have two windows B (base buffer), I (indirect buffer), and idle for a second after the change, the following will happen.
imenu--make-index-alist
textDocument.uri
= <path/to/base/file>imenu--make-index-alist
textDocument.uri
= <path/to/base/file>imenu--make-index-alist
returns imenu alist.imenu--make-index-alist
prints error after 10 seconds"Timeout while waiting for response. Method: textDocument/documentSymbol"
This error is not visible by default, because of
ignore-errors
.I'm not expert of lsp-mode or lsp protocol, but I guess that lsp server cancel? the first request after it receives the identical second request and never sends anything back for the first request.
I'm not sure whether it is correct behavior or not, but the consequences, while using it with breadcrumb, are pretty harsh.
I've come up with this fix.
It checks whether the base buffer is visible and if it is then returns
imenu--index-alist
from the base buffer.It seems that it is a good idea in general, since there is no point to update imenu index two times for the same buffer.
But I understand that the actual problem has nothing to do with breadcrumb, so you may feel free to reject this fix.
The text was updated successfully, but these errors were encountered: