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
inlay_hint enable(<no args>)
does not activate inlay hints on open buffers
#28624
Comments
enable(<no args>)
does not activate inlay hints on open buffers
Ah it looks like we opened issues separately regarding similar things with |
I will move over the case I found here: vim.lsp.inlay_hint.is_enabled() -- false (ok ✅)
vim.lsp.inlay_hint.enable(true) -- enable globally
vim.lsp.inlay_hint.is_enabled() -- true (ok ✅)
vim.lsp.inlay_hint.is_enabled({ bufnr = 0 }) -- true (ok ✅)
vim.lsp.inlay_hint.enable(false, { bufnr = 0 })
vim.lsp.inlay_hint.is_enabled({ bufnr = 0 }) -- true (wrong ❌) |
Thanks for investigating @ofseed let me know if you want me to reopen my issue to separate them. I figured they may be resulting from the same root cause. Granted I also can't replicate the other issue with just calling enable without a buffer number |
@justinmk I still can't find how to reproduce, can you please provide a more detailed use case? |
tested with 5282361 :
If step (2) is changed to |
|
This may be important information. Rather than reload the buffer by Edit: I found I can reproduce it by |
yes |
Also, it might take time before the inlay hints are shown. I've this experience with a rust project that has a few "heavy" dependencies and rust_analyzer is "chewing" on the code for some minutes. And until then nothing is shown. Inlay hints are the last thing that seems to be performed. I've observed the same behavior in vscode. |
This is a bug that needs to meet certain conditions to occur, and it does exist. #28629 will fix it. |
Problem
regression from #28523 or #28543
Workarounds
vim.lsp.inlay_hint.enable(true, {bufnr=0})
:edit
activates the hintsExpected behavior
vim.lsp.inlay_hint.enable(nil|true)
should activate inlay hints for open buffersThe text was updated successfully, but these errors were encountered: