statusline.lua icon indicating copy to clipboard operation
statusline.lua copied to clipboard

`vim.lsp.util.get_progress_messages` will be removed in neovim 0.11

Open jinzhongjia opened this issue 2 years ago • 5 comments

According this: here

vim.lsp.util.get_progress_messages() Use vim.lsp.status() or access progress of vim.lsp.client

maybe I will open a pr to fix this

jinzhongjia avatar Aug 13 '23 05:08 jinzhongjia

code is located at https://github.com/beauwilliams/statusline.lua/blob/20ad26912935f91918da9f428761b6d1b651d632/lua/sections/_lsp.lua#L61C1-L67

jinzhongjia avatar Aug 13 '23 05:08 jinzhongjia

Thanks for letting me know. I will see about getting it patched up. If you want to write a PR feel free!

beauwilliams avatar Aug 18 '23 06:08 beauwilliams

I think this issue should be open so people know that this is still something that needs work.

As of now I still get the message every time I open nvim.

mariogarridopt avatar Aug 22 '23 06:08 mariogarridopt

We can't just switch from vim.lsp.util.get_progress_messages() to vim.lsp.status() because the return changed from array to string.

This new string return does not carry any progress data.

Moving forward it should be possible to redraw the statusline on LspProgress events:

LspProgress Upon receipt of a progress notification from the server. Notifications can be polled from a progress ring buffer of a |vim.lsp.client| or use |vim.lsp.status()| to get an aggregate message. -- https://github.com/neovim/neovim/blob/4e34ca8a/runtime/doc/lsp.txt#L593-L607

Example of message returned by various LSP's:

:lua for msg in vim.lsp.get_active_clients()[1].progress do vim.print(msg) end

mariogarridopt avatar Sep 16 '23 22:09 mariogarridopt

It looks like the maintainer of this project is no longer active. If you are experiencing the same issue, you can use my fork of the project @ #21

mariogarridopt avatar Nov 15 '23 19:11 mariogarridopt

Hey @mariogarridopt I'm happy to merge this in, sorry for being MIA!

I've been so busy I'm still on 0.9 and haven't had the time to keep up lately.

I see there is another pr here too - https://github.com/beauwilliams/statusline.lua/pull/22

I'll merge yours in as it looks good to me and we can close out this issue 🙂

beauwilliams avatar Apr 15 '24 06:04 beauwilliams

I have just merged in #21 thanks to @mariogarridopt

beauwilliams avatar Apr 15 '24 06:04 beauwilliams