Remove the `<tab>` mapping
dbatten5 opened this issue · 2 comments
Description
It seems like this extension adds a <tab>
mapping that quotes the search term and adds a -t
postfix. Is there a way to disable this mapping? I was previously using <tab>
to multiselect results in the telescope window to send them all to the quickfix window for later usage. I've tried adding a "<tab>"
mapping of nil
to no effect.
extensions = {
live_grep_args = {
auto_quoting = true,
mappings = {
i = {
["<tab>"] = nil,
["<C-p>"] = lga_actions.quote_prompt(),
["<C-i>"] = lga_actions.quote_prompt({ postfix = " -t" }),
["<C-space>"] = lga_actions.to_fuzzy_refine,
},
},
},
Neovim version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478
Operating system and version
Mac 14.5
Telescope version / branch / rev
0.1.5
Telescope live grep args version / branch / rev
1.0.0
checkhealth telescope
==============================================================================
telescope: health#telescope#check
Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.
Checking external dependencies ~
- OK rg: found ripgrep 14.0.3
- OK fd: found fd 8.7.1
===== Installed extensions ===== ~
Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured
Telescope Extension: `projects` ~
- No healthcheck provided
Steps to reproduce
- Open the telescope window with
require("telescope").extensions.live_grep_args.live_grep_args()
- Enter a search term
- Navigate to a result and press Tab
Expected behavior
It multiselects the result
Actual behavior
It quotes the search term and adds a -t
postfix
Minimal config
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
require('packer').startup {
{
'wbthomason/packer.nvim',
{
'nvim-telescope/telescope.nvim',
requires = {
'nvim-lua/plenary.nvim',
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', },
{ 'nvim-telescope/telescope-live-grep-args.nvim', },
},
},
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config = {
package_root = package_root,
compile_path = install_path .. '/plugin/packer_compiled.lua',
display = { non_interactive = true },
},
}
end
_G.load_config = function()
require('telescope').setup()
require('telescope').load_extension('fzf')
require('telescope').load_extension('live_grep_args')
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
print("Installing Telescope and dependencies.")
vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
Thanks for reporting the issue @dbatten5 . live grep args does not specify any default mappings. I was also unable to reproduce the issue with the minimal config provided from the issue description.
For tests, make sure, that you only load your minimal config. Also check if you have set up any mappings.
Going to close this issue, because I am unable to reproduce it. Also happy to reopen it, if there are more information about how to reproduce it.
Historically, terminal emulators could not distinguish between certain control
key modifiers and other keys. For example, and are represented in
the same way, as are and <C-[>, and , and and .
See :h tui-input
.
In other words, your configuration includes the <C-i>
to lga_actions.quote_prompt({ postfix = " -t" **})
is also overriding the tab
behavior you usually have.
You could either configure your terminal emulator to disable this mapping <C-i> <-> <Tab>
or you could change your telescope-live-grep-args to use another keymap.
Related issue: neovim/neovim#5916.