fidget.nvim icon indicating copy to clipboard operation
fidget.nvim copied to clipboard

psalm lsp progress notifications not showing

Open sebcode opened this issue 1 year ago • 2 comments
trafficstars

psalm lsp for PHP has support for $/progress notifications as far as I can see, however they are not displayed by fidget.nvim.

I created a minimal repro in this gist. How to use:

cd /tmp
git clone https://gist.github.com/sebcode/0086609b2bf8c46fe96194ff3f394ecf repro
cd repro
bash bootstrap.sh
nvim -nu init.lua a.php 
# Now quit nvim with :q and start nvim again
nvim -nu init.lua a.php 
:LspStart php

In the log file /tmp/fidget.nvim.log I can see that fidget receives progress notifications, but they are not displayed:

[INFO  Mon 19 Feb 2024 17:07:32 CET] /lua/fidget/progress/lsp.lua:74: nvim $/progress handler for client 1 (psalm) invoked: {
  token = "tkn65d37cc229df21.88380022",
  value = {
    kind = "report",
    message = "registering stub files"
  }
}

sebcode avatar Feb 19 '24 16:02 sebcode

Thanks for submitting such a nice repro setup!

The reason this isn't working is because of the same issue as #177: Fidget can only poll from active clients, because Neovim does not provide an API for clients that haven't fully initialized yet. I had put that issue on hold because I was never able to find a working example of an LSP server that sends messages before being fully initialized, but now we have it. I'll work on this soon.

j-hui avatar Feb 19 '24 22:02 j-hui

In the meantime, I added 60404ba to at least warn about this issue in the logging. It's not a solution, but at least it should point users to the right place.

j-hui avatar Feb 19 '24 22:02 j-hui

@j-hui just found out that if I setup root_dir = require('lspconfig').util.root_pattern('package.json') for ts_ls it doesn't show up even tho it attached to the buffer in :LspInfo. I think it's related to this issue.

chrisands avatar Oct 29 '24 10:10 chrisands

This issue should actually be closed, since it should be fixed by #252.

@chrisands Your issue is probably unrelated. Please see this comment and open an new issue if the problem persists. This issue is specifically about psalm lsp.

j-hui avatar Oct 29 '24 16:10 j-hui