arkav / lualine-lsp-progress

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

Fix spinner not updating #20

Open BobbyGerace opened 2 years ago

BobbyGerace commented 2 years ago

https://github.com/arkav/lualine-lsp-progress/issues/15

I ran into this same issue... looks like the timer wasn't implemented correctly and so the spinner was relying on status updates.

Wrapping the function in a vim.schedule_wrap appears to fix the problem

icholy commented 2 years ago

This fix is working for me. But reading the code, I'm surprised that the timer is never stopped.

BobbyGerace commented 2 years ago

That is a good point... I'd expect the timer to stop when the lsp has finished loading. I'd be happy to include that in this PR too if @arkav is okay with it.

icholy commented 2 years ago

Should probably be a separate PR.

effinsky commented 6 months ago

is this solved on master? I only want to use the spinner but it's super janky.

mutate_section_c {
  "lsp_progress",
  display_components = { "spinner" },
  separators = {
    component = " ",
    progress = " | ",
    spinner = { pre = " ", post = " " },
  },
  timer = { spinner = 500 },
  spinner_symbols = {
    "[    ]",
    "[=   ]",
    "[==  ]",
    "[=== ]",
    "[====]",
    "[ ===]",
    "[  ==]",
    "[   =]",
    "[    ]",
    "[   =]",
    "[  ==]",
    "[ ===]",
    "[====]",
    "[=== ]",
    "[==  ]",
    "[=   ]",
  },
}
WhoIsSethDaniel commented 6 months ago

@effinsky please try https://github.com/WhoIsSethDaniel/lualine-lsp-progress.nvim instead of this. This repo is no longer maintained.