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

added previewer to directory picker #16

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

LamprosPitsillos
Copy link
Contributor

No description provided.

@jvgrootveld
Copy link
Owner

Ty for your contribution. I was a little absent lately due to different things. I just want to let everyone know will check all Open issues and PR's shortly.

@LamprosPitsillos
Copy link
Contributor Author

Better late than never, welcome back 🙏

@jvgrootveld jvgrootveld self-assigned this Jul 25, 2024
@jvgrootveld jvgrootveld added the enhancement New feature or request label Jul 25, 2024
@@ -104,6 +104,7 @@ return function(opts)

pickers.new(opts, {
prompt_title = z_config.get_config().prompt_title,
previewer = require("telescope.previewers.buffer_previewer").cat.new(opts),
Copy link
Owner

@jvgrootveld jvgrootveld Jul 31, 2024

Choose a reason for hiding this comment

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

Could you move the require on top of the file and use that here?

like:

Top of file:

local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")
local finders = require("telescope.finders")
local pickers = require("telescope.pickers")
local sorters = require("telescope.sorters")
+ local previewers = require("telescope.previewers")
local utils = require("telescope.utils")

Usage:

pickers
  .new(opts, {
    prompt_title = z_config.get_config().prompt_title,
+   previewer = previewers.vim_buffer_cat.new(opts),

    finder = finders.new_table({

Also see the Telescope previewers documentation.

Copy link
Owner

@jvgrootveld jvgrootveld left a comment

Choose a reason for hiding this comment

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

@LamprosPitsillos Simple but awesome addition, I had a little change request to make the code a little nicer. After the change I will accept this asap.

ETA: I was just thinking, maybe we could set the vim_buffer_cat previewer as a default in the zoxide config, so people can disable or override this (default) previewer. Thoughts?

@jvgrootveld
Copy link
Owner

@LamprosPitsillos I notice you are also busy. Because my comments are just moving code, I will accept this PR and update the code myself at a later time. Thanks again!

@jvgrootveld jvgrootveld merged commit 6d23b61 into jvgrootveld:main Aug 8, 2024
@LamprosPitsillos
Copy link
Contributor Author

Thank you, yes, this past few weeks i am trying to adjust to work, and can't find much time for OpenSource, hopping to find a balance soon

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

Successfully merging this pull request may close these issues.

2 participants