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

Mattias/progress tick #36

Merged
merged 12 commits into from
Sep 6, 2023
Merged

Mattias/progress tick #36

merged 12 commits into from
Sep 6, 2023

Conversation

kndndrj
Copy link
Owner

@kndndrj kndndrj commented Aug 25, 2023

adds progress ticker

cancel query?

@kndndrj
Copy link
Owner Author

kndndrj commented Aug 25, 2023

@MattiasMTS I hope you don't mind me opening this PR. I have a small commit, which addresses your comment. If you give me push permissions for this pr, I can push it.

@MattiasMTS
Copy link
Collaborator

@MattiasMTS I hope you don't mind me opening this PR. I have a small commit, which addresses your comment. If you give me push permissions for this pr, I can push it.

I sent you an invitation request as a collaborator just now! Let me know if that works. Feel free to delete the leftover commit 36fb188 since it is not meant to be in this one.. My bad.

@@ -188,8 +193,22 @@ function Conn:show_page(page)
self.page_ammount = self.page_ammount - 1
end

if self.remaining_time == nil then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this can be removed and refactor the code below by adding or operator:

vim.api.nvim_win_set_option(
    winid,
    "winbar",
    "%="
      .. "Finished in "
      .. string.format("%.3f", self.remaining_time or 0.0)
      .. "s | "
      .. tostring(page + 1)
      .. "/"
      .. tostring(self.page_ammount + 1)
  )

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved in 1c5f1d7

@kndndrj
Copy link
Owner Author

kndndrj commented Aug 25, 2023

Here is the commit, feel free to overwrite it if you see fit

@MattiasMTS
Copy link
Collaborator

MattiasMTS commented Aug 25, 2023

Here is the commit, feel free to overwrite it if you see fit

Awesome! I'll probably take a look at this on Sunday (busy tonight and tomorrow hehe). Thanks for the commit!! 😃

@kndndrj
Copy link
Owner Author

kndndrj commented Aug 26, 2023

No rush. I also won't be able to spend any time on this fora while

@MattiasMTS
Copy link
Collaborator

Ready for review @kndndrj . I left the implementation of this PR to only add the query progress bar - otherwise, it might have been messier..

Here are some video examples of how it looks like. Feel free to try it out.

Default config

default_example.mov

Custom config

custom_example.mov

@kndndrj
Copy link
Owner Author

kndndrj commented Sep 2, 2023

@MattiasMTS Looks very pretty! I agree to narrow the scope of this PR to a single feature as well.

I need to test it first, but otherwise it looks ok!

Since this is a pretty straight forward feature I'll use this branch to do the changes if i find something is not working (if you don't mind ofcourse)

@kndndrj kndndrj merged commit e7800b8 into kndndrj:master Sep 6, 2023
@kndndrj
Copy link
Owner Author

kndndrj commented Sep 6, 2023

same here, just moved some stuff around, the way it makes more sense for me.

Thanks again!

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

Successfully merging this pull request may close these issues.

2 participants