Open daUnknownCoder opened 5 months ago
Roughly speaking:
text.spinner
=> progress.display.progress_icon
; you can just use the existing "dots_negative"
patterntext.done
=> progress.display.done_icon
text.commenced
and text.completed
=> progress.display.format_message
(see also)timer.spinner_rate
=> notification.poll_rate
is kind of like FPS---how often to render the screen. But that's detached from how long one cycle of the animation will take, which can be adjusted using progress.display.progress_icon.period
timer.fidget_decay
=> the ttl
key for configs inside notification.configs
; you can adjust the default
config based on the provided default, or create a new one for each LSP progress task grouptimer.task_decay
=> progress.display.done_ttl
window.relative
=> notification.window.relative
window.blend
=> notification.window.winblend
window.border
=> notification.window.border
debug.logging
=> logger.level
(set it to INFO
or DEBUG
if you want it noisy)debug.strict
=> deprecatedThe config seems much more complicated now because it allows for much more fine-grained configuration, and the usage of Fidget as a UI for more things than just LSP progress notifications (e.g., as the default vim.notify
backend). Unfortunately this means some options are buried deeper, but that's the cost of flexibility (which you might not get the benefit of, but I hope you do through exploring some of the more recent features 🙂).
A couple more things:
LspAttach
event since it is supposed to be used for more than just LSP. If you do find that it is hanging your startup, please open another issue and we can work on speeding up fidget.setup
, there's no work that it does that should take that long.require
calls with pcall
if dependencies are managed correct, but even if they aren't and require
fails, your config
function will crash because it just prints about the error but continues on to call fidget.setup
anyway.
text.spinner
=>progress.display.progress_icon
; you can just use the existing"dots_negative"
pattern
if you see my config, you might notice the pattern is _dotspositive so if you might add that ... and if not can i pass a table as i used to?
I don't recommend lazy-loading Fidget on the LspAttach event since it is supposed to be used for more than just LSP.
Earlier it was just used for LSP so...
You shouldn't need to guard the require calls with pcall if dependencies are managed correct
every plugin i use has this should i replace with barren requires? does it tend to increase startuptime?
alright ig moving from legacy
to upstream
has its consequences and i have to spend some hours reconfiguring stuff...
Sorry for not responding sooner, a lot of stuff came up.
if you see my config, you might notice the pattern is
dots_positive
so if you might add that ... and if not can i pass a table as i used to?
You can certainly customize this, though admittedly the configuration interface is not very user-friendly. I'm working on improving the situation in #251 but it's still a work in progress. The changes I might not be backwards compatible, so I'll refrain from giving concrete instructions lest it break imminently.
Earlier it was just used for LSP so...
I understand, but my recommendation applies to Fidget as it is written now, which handles more than LSP progress.
every plugin i use has this should i replace with barren requires? does it tend to increase startuptime?
I'm not sure about pcall
's effect on startuptime---you will need to benchmark this---but that's not my point. Rather, my point is, if you're going to catch an error, you should probably handle it. That's not what you're doing---you just print a message and continue execution, so it will still crash later.
alright ig moving from legacy to upstream has its consequences and i have to spend some hours reconfiguring stuff...
Yeah, sorry. I promise I'm not just introducing breaking changes to make your life difficult, but please understand that spending hours configuring stuff comes with the territory, at least in my view.
Yeah, sorry. I promise I'm not just introducing breaking changes to make your life difficult, but please understand that spending hours configuring stuff comes with the territory, at least in my view.
oh i never was complaining dont take it that way, i was just a little busy myself making my neovim distro... contributing to open source itself is a breaking change from closed source sh!t (imo)
if you're going to catch an error, you should probably handle it.
so are you saying me to do something like this? :
local status_ok, fidget = pcall(require, "fidget")
if not status_ok then
print("fidget not found")
else
-- my config
end
is this what you are asking me?
is this what you are asking me?
Not really. My suggestion is much simpler:
local fidget = require("fidget")
local icons = require("NeutronVim.core.icons")
fidget.setup(--[[ your config ]])
If require
fails it will complain loudly and throw an error. I'm suggesting there's no point pcall
ing around this behavior because this is the behavior you want: Fidget, the icons pack, and Lazy (used to download Fidget) are all part of your distribution, so none of them should be missing. And if they are missing for some reason, you should throw an ugly error to prevent yourself from releasing this error as part of your distribution.
- I don't recommend lazy-loading Fidget on the
LspAttach
event since it is supposed to be used for more than just LSP.
For someone obsessed with lazy-loading and low startup time, which events do you recommend for Fidget? Could it be "BufReadPre" and "BufNewFile"? As a sidenote, I used to set it to "LspAttach" on neovim v0.9.5 and occasionally I encoutered fidget errors on quiting neovim. I haven't tried that on v0.10 though.
- I don't recommend lazy-loading Fidget on the
LspAttach
event since it is supposed to be used for more than just LSP.For someone obsessed with lazy-loading and low startup time, which events do you recommend for Fidget? Could it be "BufReadPre" and "BufNewFile"? As a sidenote, I used to set it to "LspAttach" on neovim v0.9.5 and occasionally I encoutered fidget errors on quiting neovim. I haven't tried that on v0.10 though.
i use VeryLazy
I m way back and using the old config, and there are some options such as
poll_rate
which went over my head and there are a few missing options...this is my feature ~rich~ old config:
so can you pls help me?