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

Use bookmarks directories #8

Open
danymat opened this issue Jan 11, 2022 · 8 comments
Open

Use bookmarks directories #8

danymat opened this issue Jan 11, 2022 · 8 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@danymat
Copy link

danymat commented Jan 11, 2022

Hello, thanks for the plugin, it works well !

I'm using it with safari, and I propose these features:

  1. Using bookmark directories as telescope directories

Capture d’écran 2022-01-11 à 10 43 12

  1. Add option to only open a certain directory, for example: Telescope bookmarks Pentest

Capture d’écran 2022-01-11 à 10 44 04

What do you think about these ? I really like the second one, as I could create a proper directory for neovim

@dhruvmanila
Copy link
Owner

Hey, I'm glad you find it useful.

  1. Using bookmark directories as telescope directories

I don't know how that would be useful as, for me, Telescope is something I use to fuzzy search a list of items and "navigating" a list has never appealed to me. But hey, that's me, if you think this could be useful I will be more than happy to help you implement it.

  1. Add option to only open a certain directory, for example: Telescope bookmarks Pentest

This is quite useful, and the way I do it is by directly typing the word "Pentest" in the prompt window and Telescope will filter out the results to show the relevant results on the top. Another way would be to use nvim-telescope/telescope-fzf-native.nvim with the exact match token '.

Again, if you think the proposed features are useful, you can submit a PR and I can help you with that.

@danymat
Copy link
Author

danymat commented Feb 15, 2022

I don't know how that would be useful as, for me, Telescope is something I use to fuzzy search a list of items and "navigating" a list has never appealed to me. But hey, that's me, if you think this could be useful I will be more than happy to help you implement it.

You're right about this, I'm dropping this idea.

This is quite useful, and the way I do it is by directly typing the word "Pentest" in the prompt window and Telescope will filter out the results to show the relevant results on the top. Another way would be to use nvim-telescope/telescope-fzf-native.nvim with the exact match token '

Sure ! However I think having a map for Telescope bookmarks Pentest (or any keyword) could be hyper beneficial for people like me who divide their bookmarks in sections

@dhruvmanila dhruvmanila added the enhancement New feature or request label Feb 17, 2022
@dhruvmanila
Copy link
Owner

I've looked into how Telescope accepts command line arguments and sadly the way you've mentioned (Telescope bookmarks Pentest) is not possible as the plugin will translate that to:

require("telescope").extensions.bookmarks.Pentest()

What is possible though is to use keyword arguments like filter=Pentest which can be passed either of the following way:

From the command-line:

:Telescope bookmarks filter=Pentest

lua function call:

require("telescope").extensions.bookmarks.bookmarks({ filter = "Pentest" })

Does this work?

@danymat
Copy link
Author

danymat commented Apr 3, 2022

This can be an idea indeed, however we could get false positives (some bookmarks called pentest but not on penitent directory)

@dhruvmanila
Copy link
Owner

(some bookmarks called pentest but not on penitent directory)

I don't understand this. Can you elaborate a bit?

Also, do you want the filter to work on nested directories or just on the root directories? We could use a trie data structure to represent this which could make filtering easy or else just use simple pattern matching. I could even keep a separate entry which will include the directory path only.

@dhruvmanila
Copy link
Owner

Hi @danymat, any update here?

@dhruvmanila dhruvmanila added the question Further information is requested label Mar 14, 2023
@danymat
Copy link
Author

danymat commented Mar 14, 2023

Hello, no update, didn't have time to get into that. I will try to implement something if I get time.

I don't understand this. Can you elaborate a bit?

Yes, as telescope is fuzzy search, a bookmark with pentest inside will be in the same search result as the bookmarks inside a Pentest/ directory.

Keep me in touch if you have any ideas :)

@nyngwang
Copy link

[...] Another way would be to use nvim-telescope/telescope-fzf-native.nvim with the exact match token '.

FYI: This works on ibhagwan/fzf-lua without the linked plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants