arkav / lualine-lsp-progress

LSP Progress lualine componenet
MIT License
226 stars 18 forks source link

Spinner not updating with TypeScript LSP #15

Open icholy opened 2 years ago

icholy commented 2 years ago

The spinner doesn't update when using typescript-language-server.

tty

The LSP doesn't send $/progress reports aside from begin and end (because the underlying tsserver doesn't support them). I proposed sending fake progress reports, but that wasn't accepted. https://github.com/typescript-language-server/typescript-language-server/pull/373

Is there a way to work around this?

BobbyGerace commented 2 years ago

I had this issue as well. Here is a pull request with a fix https://github.com/arkav/lualine-lsp-progress/pull/20

rockyzhang24 commented 2 years ago

The spinner works well in ts file now. Probably some updates on upstream made this issue fixed.

icholy commented 2 years ago

@rockyzhang24 the spinner should be updating every 500 milliseconds https://github.com/arkav/lualine-lsp-progress/blob/master/lua/lualine/components/lsp_progress.lua#L25

rockyzhang24 commented 2 years ago

@icholy Yes it works and updates as expected on my side.

icholy commented 2 years ago

@rockyzhang24 which versions of neovim, lualine-lsp-progress, and typescript-langauge-server do you have installed?

rockyzhang24 commented 2 years ago

@icholy neovim version: NVIM v0.8.0-dev+1660-g9e4286294 (the nightly) lua-lsp-progress: normally installed and the latest commit typescript-language-server: 0.10.0, the latest

I cloned a large repo supabase to make the progress noticeable.

https://user-images.githubusercontent.com/11582667/168614741-0daa7d3e-d26d-49b9-99f7-2b23b26755c2.mov

icholy commented 2 years ago

@rockyzhang24 those are the begin / end progress notifications coming through. If you open a larger project (on a slower computer), you'll notice that it's not updating correctly. Your computer is loading the project so quickly that you're not seeing the issue.

rockyzhang24 commented 2 years ago

Not really. They are not just begin and end progress. See the screenshot below.

1 2 3

Both the first two pics are in the "progress" step. Thanks.

icholy commented 2 years ago

I just checked mine again and I am getting 1 update while (In Progress). Again, if you manage to find a project that takes more than a few seconds to load, you will see the issue.

rockyzhang24 commented 2 years ago

@icholy Let me find a large project and try it again.

Update: Yes, you're right. I tested again in a large ts repo and the spinner was stuck after one update while (In Progress) until (Completed).

@arkav Could you please merge the PR to fix this issue? Thanks a lot.

icholy commented 2 years ago

@rockyzhang24 out of curiosity, what kind of machine (specs) are you running on?

rockyzhang24 commented 2 years ago

@icholy 16 inch MacBook Pro with M1 Pro, 32GB Memory + 1TB SSD.