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

Telescope preview with long file path #411

Open
nkien0204 opened this issue Dec 11, 2023 · 2 comments
Open

Telescope preview with long file path #411

nkien0204 opened this issue Dec 11, 2023 · 2 comments

Comments

@nkien0204
Copy link

When I use Harpoon as extension of Telescope to open a file with really long path, it just display from the beginning, and I can not see the file name. The problem is if I have 2 different files but same directory, Telescope will show exactly the same and I think it quite inconvenience!

image

I think this will better if it perform like the other Telescope preview windows, always show the file name. Like this:

image
@kimabrandt-flx
Copy link

The #512 PR would allow you to use the path_display = { "truncate" }-config for telescope. If it's already set - inside your telescope defaults - it should just work!

require("telescope").extensions.harpoon.marks({
    path_display = { "truncate" },
})

or

require("telescope").extensions.harpoon.marks(
    require("telescope.themes").get_dropdown({
        path_display = { "truncate" },
    })
)

or

-- when setting up telescope:
require("telescope").setup({
    defaults = {
        path_display = { "truncate" },
    },
})

-- when using a keymap:
require("telescope").extensions.harpoon.marks()

...

@idelice
Copy link

idelice commented Feb 21, 2024

@ThePrimeagen can we please merge this awesome feature.. long path names makes the actual filenames non-visible

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

No branches or pull requests

3 participants