Skip to content
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

feat: deduplicate progress messages #162

Closed
j-hui opened this issue Nov 13, 2023 · 4 comments · Fixed by #190
Closed

feat: deduplicate progress messages #162

j-hui opened this issue Nov 13, 2023 · 4 comments · Fixed by #190
Labels
enhancement New feature or request

Comments

@j-hui
Copy link
Owner

j-hui commented Nov 13, 2023

Sometimes, an LSP server will start multiple tasks with the same message:
image

It makes no sense for Fidget to display all of them.

@j-hui j-hui added the enhancement New feature or request label Nov 13, 2023
@gegoune
Copy link

gegoune commented Nov 13, 2023

An idea: instead of hiding duplicates a counter, similar to one in browser's dev tools, could be displayed:

(2x) Completed Building (and then bump x counter on each repetition). What do you think?

@j-hui
Copy link
Owner Author

j-hui commented Nov 13, 2023

I like the counter idea a lot! I'm wondering though, what mechanism should we use for deduplication?

At the moment, deduplication happens by key (which is the token accompanying each progress message); my initial thought was to add an option to the progress subsystem that allows that to be overridden, and use the message title as the key.

But what you're suggesting seems to be a feature on the notifications-side, which allows notifications with the same content to be deduplicated while rendering. That would allow other notifications to also be deduplicated, not just LSP progress notifications. But then we'd need to figure out what to use as the "hash" of each item for deduplication---maybe the message + annote contents will do?

Edit: Oops, fat-fingered the close button.

@j-hui j-hui closed this as completed Nov 13, 2023
@j-hui j-hui reopened this Nov 13, 2023
@mawkler
Copy link
Contributor

mawkler commented Nov 15, 2023

I would love a deduplication feature as well. When using ltex-ls I get the notification "checking document" for every keypress in insert mode, and they quickly start stacking:

fidget-notifications

@mawkler
Copy link
Contributor

mawkler commented Jan 10, 2024

Works great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants