nvim-bqf icon indicating copy to clipboard operation
nvim-bqf copied to clipboard

Support for Telescope

Open Shatur opened this issue 3 years ago • 10 comments

Is your feature request related to a problem? You mentioned that Preview with fzf needs a pipe command, Windows can't be supported.. But there is an awesome telescope.nvim that works fast and allows to avoid using external program. It would be nice to support it :)

Describe the solution you'd like It would be nice to have an option to use Telescope instead of FZF.

Shatur avatar Mar 27 '21 01:03 Shatur

Every fuzzy find can import the data of the current quickfix and become a filter for quickfix. But for now, only the UI of fzf perfectly compatible with quickfix.

If you want to filter data for quickfix, I think you can do it in telescope.nvim.

kevinhwang91 avatar Mar 27 '21 06:03 kevinhwang91

You mentioned that Preview with fzf needs a pipe command, Windows can't be supported.. But there is an awesome telescope.nvim that works fast and allows to avoid using external program. It would be nice to support it :)

I am not sure if you are still using bqf, but preview with fzf has been supported for Windows since https://github.com/kevinhwang91/nvim-bqf/commit/50dae9a5ebabaf8857ccb6becabe708b440360f0.

kevinhwang91 avatar Jan 31 '22 15:01 kevinhwang91

nvim community is all moving to telescope so

dagadbm avatar Jul 21 '22 22:07 dagadbm

nvim community is all moving to telescope so

so PR is welcome

kevinhwang91 avatar Jul 22 '22 02:07 kevinhwang91

Telescope already supports quickfix filtering, so not sure if anything is actually needs to be done here.

The workflow is this:

  • Get your data into a quickfix
  • Run :Telescope quickfix, this will open the telescope with the current quickfix contents.
  • Filter data as needed in Telescope UI.
  • Send the results from Telescope back into the quickfix, default action is <C-q>.

Voila, now the quickfix is filtered.

defr0std avatar May 06 '23 19:05 defr0std

Telescope already supports quickfix filtering

The issue is it uses fuzzy finding which is not always desirable.

Shatur avatar May 06 '23 19:05 Shatur

Describe the solution you'd like It would be nice to have an option to use Telescope instead of FZF.

Then maybe I did not understand what this issue is about. It says:

Describe the solution you'd like
It would be nice to have an option to use Telescope instead of FZF.

Isn't FZF a fuzzy finder by definition? :)

defr0std avatar May 06 '23 19:05 defr0std

Oh, sorry, I thought that it's a different issue :)

The workflow is good, but bqf provides more. Fzf integration for Neovim also have quickfix picker.

Shatur avatar May 06 '23 20:05 Shatur

Currently no nvim-bqf change (more: no nvim-bqf) is needed to filter quickfix list using Telescope. Try :Telescope quickfix or create a keymap like below (possibly with pcall on require):

local function configureWindow()
 --- other settings
  vim.keymap.set({'n'}, 'zf', require('telescope.builtin').quickfix, {buffer = true})
end

local augroup = vim.api.nvim_create_augroup ('BqfMappings', {clear = true })
vim.api.nvim_create_autocmd ('FileType', {
  group = augroup,
  pattern = 'qf',
  callback = configureWindow,
})

Conversely, on the Telescope side we can create the new quickfix list (<C-q> by default, run <C-/> for help).

@kevinhwang91 it would be good to add such hint to README.

przepompownia avatar Oct 16 '23 11:10 przepompownia

Currently no nvim-bqf change (more: no nvim-bqf) is needed to filter quickfix list using Telescope. Try :Telescope quickfix or create a keymap like below (possibly with pcall on require):

local function configureWindow()
 --- other settings
  vim.keymap.set({'n'}, 'zf', require('telescope.builtin').quickfix, {buffer = true})
end

local augroup = vim.api.nvim_create_augroup ('BqfMappings', {clear = true })
vim.api.nvim_create_autocmd ('FileType', {
  group = augroup,
  pattern = 'qf',
  callback = configureWindow,
})

Conversely, on the Telescope side we can create the new quickfix list (<C-q> by default, run <C-/> for help).

@kevinhwang91 it would be good to add such hint to README.

It's not necessary to add this hint because this issue is open.

kevinhwang91 avatar Oct 17 '23 09:10 kevinhwang91