bookmarks.nvim icon indicating copy to clipboard operation
bookmarks.nvim copied to clipboard

Feature Request: infer/default bookmark name

Open ten3roberts opened this issue 2 years ago • 2 comments

First of all, I love this plugin and use it daily for keeping track of and jumping around different large codebases.

I often create bookmarks for functions or structs, and if would as such be great if bookmarks could use treesitter or similar to look up the name of the current function/ident and prefill the popup for the bookmark name with the ident of it.

Thank you

ten3roberts avatar Aug 10 '23 10:08 ten3roberts

you can use telescope with:


-- config:
         local present, telescope = pcall(require, "telescope")
         if present then
            telescope.setup {
               extensions = {
                  fzf = {
                     fuzzy = false,
                     override_generic_sorter = true,
                     override_file_sorter = true,
                     case_mode = "smart_case",
                  },
               },
            }
            telescope.load_extension "fzf"
            telescope.load_extension "bookmarks"
         end

-- map:
map("n", "<leader>fb", "<Cmd>Telescope bookmarks list<CR>", opt)

tomasky avatar Aug 21 '23 08:08 tomasky

Oh, I might have been unclear.

This is only for listing them and showing a preview of their location.

What I am after is having the annotation of a bookmark be deduced from the current function or context, rather than writing the annotation yourself

ten3roberts avatar Aug 21 '23 09:08 ten3roberts