-
Notifications
You must be signed in to change notification settings - Fork 59
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
fix: inlay hints maybe a bit delayed if sync init #357
fix: inlay hints maybe a bit delayed if sync init #357
Conversation
autoload/lsp/inlayhints.vim
Outdated
acmds->add({bufnr: bnr, | ||
event: ['User'], | ||
group: 'LspAttached', | ||
cmd: $'LspInlayHintsChanged({bnr})'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LspAttached autocmd handler needs to be executed only once for this buffer. So can you add once: v:true
to the autocmd Dict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1, i donot know why, but once added once: true
, that au may not be kicked-off.
2, normally bufinit would/should be done only once when addFile()?? unless manually doau
it again.
3, exists('#User#LspAttached')
seems should be exists('#LspAttached#User')
but actually worked, weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If once
is not used, then the autocmd will be present forever (even though it will not be invoked).
If you run the :autocmd
command, you will see too many of these.
Are you saying that if you set once
to true
, then the autocmd is not invoked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
once
is not used, then the autocmd will be present forever (even though it will not be invoked).
If you run the:autocmd
command, you will see too many of these
yes, since it's on buf, if that's a concern, then maybe a bit annoyed, but:
Are you saying that if you set
once
totrue
, then the autocmd is not invoked?
yes, au was not invoked at all, no even once (nothing).
r.i.p bram. |
I don't know why you closed this PR. But I intend to continue to develop and maintain the LSP plugin. |
Signed-off-by: shane.xb.qian <[email protected]>
5a597d7
to
2cfbeb6
Compare
Hope this PR can be merged soon. Without this, my rust-analyzer doesn't until I execute |
No description provided.