-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite fidget.nvim #131
Comments
References: j-hui/fidget.nvim#131 Signed-off-by: Fletcher Nichol <fnichol@nichol.ca>
It might be worth having a look at https://github.com/rcarriga/nvim-notify and getting in touch with the maintainer. Both plugins seem to aim for something similar. |
|
no offense, would you consider removing your |
@goolord If you want to suppress the message, just checkout the |
@j-hui Sorry, this might be a trivial question, but how does one checkout the 'legacy' tag in a lua config? I've tried putting 'tag' = 'legacy' when lazy loading fidget and also in a setup function for fidget but neither of these two options have worked in suppressing the message. |
@che247 Make sure you have also updated the plugin using plugin manager after putting tag = 'legacy'. It worked for me. |
That worked for me.. I don't know if deleting it first and then having lazy reinstall the package also helped but I did that as well as manually updating the package in Lazy as well. Thank you @nwkm! |
That warning message is getting rather annoying, and I only just saw it in the last one hour. I will have to stop using this if I can't find a fix for it since the recommended fix isn't working for me for some reason I can't yet find. Tried using the legacy tag a few different ways, but from comments above, this line below should work, and yet it doesn't even after removing and reinstalling fidget. Any suggestions on what else I can try? { 'j-hui/fidget.nvim', opts = { tag = 'legacy' } }, edit: fyi, I'm using Lazy w/mason. |
@jose8a AFAIK, the {
'j-hui/fidget.nvim',
tag = 'legacy',
} |
I am wondering why we need to change the branch here. Can we just do the rewrite in another branch and merge into |
Worked for me, just remember to run Lazy's sync command. |
👋🏻 Any chance of getting a milestone created that people can track progress? Thanks! |
Came up a little short on luck, but hopefully not too short. Thanks for your patience, everyone. I have something working on the Gone is the old, single-file mess of a state machine. And here's some new features:
Yeah, some of these implementation decisions are questionable or over-engineered, but at least the code feels much more flexible and hackable now. I've added several features in the last couple of days that took little effort with the current design/organization. A few things still need to be done before I release (and I promise I'll actually get these done within the week). Mostly busy work:
|
For any Or delete the relevant |
Oof sorry about that, I forgot that GitHub would automatically delete my branch after that PR closed. But I guess I'll leave it deleted since that was only meant to exist temporarily, and I do want folks to move onto Thanks for pointing out the relevant solution @polyzen. |
I've been sitting on this idea for too long; fidget was always a pun on "widget" but I could never decide what the right abstractions were. But now that I've studied/worked on a couple of reactive/synchronous frameworks, I'm finally going to give this a shot. Besides, #130 gave me the kick in the ass I needed (more on the PR later).
Some ramblings about the execution model: my first implementation is basically a fancy event-driven state machine, and is really not extensible. It works as a proof of concept, but it's ugly, unintuitive to configure or extend, and slow (I actually disable this plugin in environments where I am often working with noisy LSP servers).
To address the speed issue, something like neovim/neovim#23958 will provide some form of rate-limiting and also address space leaks in the messages buffer, but I also think fidget.nvim can be much smarter about how often it polls Neovim's message buffer. In particular, we shouldn't need to check it any faster than 40Hz (probably lower), because animations don't need to render faster than that, and notifications don't need to be shown immediately.
Instead, I plan on driving the execution of fidget with a heartbeat (that can be let to idle if there's no activity).
The other part I want to change is to extend fidget to be a general-purpose framework for constructing animated widgets in Neovim. I want to follow some kind of model loosely inspired by Flutter, with a tree of widgets that compose efficiently and intuitively. The LSP progress is just one instance of things we can do with this framework (and of course will always have first-class support in this plugin), but I'd also like this to be usable for notifications (Edit: this never happened, it's simply too overkill.vim.notify
), widget dashboards, and all the stuff you might want to take out of your modeline to keep it clean and minimal.Oh and also, I really want to get down to the bottom of this business with highlights with extmarks. It seems super flaky and I can't tell if the problems are due to one's editor settings, terminal, font, OS, or who knows what else. Rewriting fidget as a UI framework not only gives me a chance to rework all of that, but it'll also make it easier to test and reproduce problems (instead of sending a progress notification, we can just ask fidget to draw a text box).Edit: this didn't happen either, but is still possible and may be worth experimenting with.This is all I'll write for now, and I primarily do so to keep myself accountable and folks informed. With any luck, I'll complete this rewrite within a couple of months.
The text was updated successfully, but these errors were encountered: