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

feat: Multi-select style actions

Open tjdevries opened this issue 3 years ago • 3 comments

WIP: Will update this later :)

Also will try and fix:

  • https://github.com/nvim-telescope/telescope.nvim/issues/684#issuecomment-828517987
  • https://github.com/nvim-telescope/telescope.nvim/pull/521/commits/0db1c19c624b60bee3d5174d00421b206ed35fa5#

And I'll add docs when I'm done as well. Hopefully this is backwards compat, so when testing, please let me know if you experience breaking changes.

tjdevries avatar Apr 28 '21 17:04 tjdevries

With functional wrappers around selections & entries (see #931 and telescope.actions.utils) and telescope-hop.nvim in place, I'd be happy to take this over @tjdevries :) (after my vacation next week tho) If you prefer to work on that; no worries, I'd still love to see neogit or maybe neorg having full built-in telescope integration :sweat_smile:

I'd have in mind that, for any action applicable, you should have full flexibility in running them on (i) the currently selected entry, (ii) all entries, (iii) a particular multi selection (if I understand context correctly), (iv) all multi selections. My design would be to ultimately wrap the actions into something like this:

local actions = require 'telescope.actions'
local action_utils = require 'telescope.actions.utils'
telescope.setup {
  defaults = {
    mappings = {
      i = {
        ["<C-v>"] = action_utils.with_selections(actions.select_vertical),
        -- obviously only for builtin.git_status :)
        ["<C-s>"] = action_utils.with_entries(actions.git_staging_toggle)
      },
    },
  },

Let me know what you think :)

fdschmidt93 avatar Jul 16 '21 16:07 fdschmidt93

Looks like this PR might have long gone stale.

Does anyone know if there's a workaround for selecting multiple files in telescope yet as this is quite a key missing feature compared to FZF.

Thanks.

Integralist avatar Jul 01 '22 18:07 Integralist

we currently dont have the time to finish this in a somewhat good interface, so it also works for extensions. Its not planned for telescope 0.1 and is scheduled for post 0.1. See #1938

There is an issue with workarounds for it https://github.com/nvim-telescope/telescope.nvim/issues/1048 provided by the community

Conni2461 avatar Jul 01 '22 18:07 Conni2461

+1 very much looking forward to this being official. Being able to select multiples (with TAB) but not being able to open them still is a bummer. Especially for a feature I use multiple times a day every day but I will try the workarounds.

rkulla avatar Sep 02 '23 18:09 rkulla

I think for now sending to quickflist is the best alternative when you can't open the files directly

max397574 avatar Sep 02 '23 20:09 max397574

I think for now sending to quickflist is the best alternative when you can't open the files directly

Yeah, I can stand that with vim-bqf's features but it's still a different feature all together. Luckily I have both now thanks to vim-bqf and this workaround

rkulla avatar Sep 02 '23 23:09 rkulla