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

feature: Add option to display newer logs at the top #19

Closed
1 task done
karamanliev opened this issue Dec 19, 2024 · 2 comments
Closed
1 task done

feature: Add option to display newer logs at the top #19

karamanliev opened this issue Dec 19, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@karamanliev
Copy link

karamanliev commented Dec 19, 2024

Did you check the docs?

  • I have read all the docs

Is your feature request related to a problem? Please describe.

I think that it is a better UX to display the newest logs in the floating log output window at the top.

Currently when I want to check what's changed between logs (sometimes I log big objects) I have to open the floating window, hit C+w C+w to focus it and scroll to the bottom to see the newest result.

Describe the solution you'd like

Maybe add a property to the opts table of open_float ?
Something like require('timber.buffers').open_float({sort: 'asc' / 'desc'})

Or maybe add a setting to the opts table of the plugin?

'Goose97/timber.nvim',
opts = {
...
  log_summary = {
    ...
  },
  log_float = {
    sort = 'asc',
    silent = false,
  },
}
...

Describe alternatives you've considered

Can't think of something else.

Additional context

No response

@karamanliev karamanliev added the enhancement New feature or request label Dec 19, 2024
@karamanliev karamanliev changed the title feature: Add option to desplay newer logs at the top feature: Add option to display newer logs at the top Dec 19, 2024
@Goose97 Goose97 self-assigned this Dec 19, 2024
@Goose97
Copy link
Owner

Goose97 commented Dec 19, 2024

That's a good use case. I tend to log small stuff so I just view them at the log snippet directly. But I think your use case is valid as well.

It should work now

require("timber.buffers").open_float({ sort = "newest_first" })

@karamanliev
Copy link
Author

Pffff, amazing, thank you very much! It's working perfectly.

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

No branches or pull requests

2 participants