tom-anders / telescope-vim-bookmarks.nvim

Integrates vim-bookmarks into telescope.nvim
MIT License
114 stars 23 forks source link

Delete action does not seem to work #22

Open Jendker opened 1 year ago

Jendker commented 1 year ago

Is the delete action still working as expected? With my lazy.nvim setup:

      {
        "MattesGroeger/vim-bookmarks",
        config = function()
          vim.g.bookmark_no_default_key_mappings = 1
          vim.g.bookmark_save_per_working_dir = 1
          vim.g.bookmark_sign = ""
          vim.keymap.set('n', '<Leader><Leader>', '<Plug>BookmarkToggle', { desc = "Bookmark toggle" })
          vim.keymap.set('n', '<Leader>bi', '<Plug>BookmarkAnnotate', { desc = "Bookmark annotate" })
          vim.keymap.set('n', '<Leader>bj', '<Plug>BookmarkNext', { desc = "Bookmark next" })
          vim.keymap.set('n', '<Leader>bk', '<Plug>BookmarkPrev', { desc = "Bookmark previous" })
        end,
      },
      "tom-anders/telescope-vim-bookmarks.nvim",
      {
        'nvim-telescope/telescope.nvim', version = '0.1.1',
        dependencies = { 'nvim-lua/plenary.nvim', "MattesGroeger/vim-bookmarks",  "tom-anders/telescope-vim-bookmarks.nvim"},
        config = function()
          local telescope = require('telescope')
          telescope.setup()
          -- vim_booksmarks
          telescope.load_extension('vim_bookmarks')
          vim.keymap.set('n', 'ba', telescope.extensions.vim_bookmarks.all, { desc = "Show [b]ookmarks in [a]ll files" })
          vim.keymap.set('n', 'bc', telescope.extensions.vim_bookmarks.current_file, { desc = "Show [b]ookmarks in [c]urrent file" })
          local bookmark_actions = require('telescope').extensions.vim_bookmarks.actions
          require('telescope').extensions.vim_bookmarks.all {
            attach_mappings = function(_, map)
              map('n', 'dd', bookmark_actions.delete_selected_or_at_cursor)

              return true
            end
          }
        end,
      },

Pressing dd in normal mode in Telescope does not have any action.

EnricoSteez commented 1 year ago

Same here, doesn't seem to work with neither delete_selected_or_at_cursor nor with just delete_selected