-
Notifications
You must be signed in to change notification settings - Fork 87
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
Show Full Minutes and Seconds on Query Execute #241
Conversation
Instead of adding this as an option, I'd rather leave it to the user to code their own progress bar in case they need it. We can add an option to disable the built in progress bar to not interfere with a custom one, something like |
Set default of Once I get this working I would like to update the documentation to show this process and how exactly a user can do this.
|
Changes look good, thanks! Regarding the example, feel free to create a wiki page, I opened it up so you should have permission to do it. |
What does this
I think I'm running into a problem there. When I try to run a query the progress bar pops up as expected but my queries don't actually run against Redshift. |
Every time the query is ran, it triggers an autocmd with name similar to this:
I'm not sure what you mean by queries not running against Redshift. Do they run if you do not use custom progress bar? |
If I do not source the file where I define my custom progress bar the queries run against Redshift exactly as expected. This happens with the new The only time I run into the issue is when I source the custom progress bar. See the video for an example. The timer runs but nothing is actually running. I checked Redshift as well and nothing from my user is running on that cluster. I also cannot cancel like I normally can. 2024-05-27_15-19-30.mp4 |
If everything works normally when you do not add your progress bar, then it's probably some issue in there. |
Yep! There is no issue at all unless I source my own progress bar. I think the issue is related to me not calling plug-dadbod-progress.vim which is being sourced in init.lua
Error message
|
You don't need to call that function for the progress bar. Copy this chunk of built in code and adapt it to your needs vim-dadbod-ui/autoload/db_ui/dbout.vim Lines 216 to 344 in 0dc68d9
|
Solved it. Will look into creating a wiki page this week. |
Another customization I've made is to show full minutes and seconds on query execute. This would be a completely new feature but it's something I use so I thought I'd put it into a pull request in case you'd like to merge it.
All it does is adjust the screen to show the full time of your query rather than only the seconds.
Examples:
Less than 10 seconds into the query:
Less than 1 minute into the query:
Less than 1 minute and 10 seconds into the query:
Less than 2 minutes into the query:
Less than 2 minutes and 10 seconds into the query:
More than 2 minutes and 10 seconds into the query: