Disable default mappings
oriming opened this issue · 11 comments
Can't close even if default mapping is overridden.
Below is my configuration:
local telescope = require("telescope")
local lga_actions = require("telescope-live-grep-args.actions")
telescope.setup {
extensions = {
live_grep_args = {
auto_quoting = true, -- enable/disable auto-quoting
mappings = {
i = {
["<C-l>"] = lga_actions.quote_prompt(),
}
}
}
}
}
Hi @matrix-f . If you don't want to use the default mappings, you have to override them:
local telescope = require("telescope")
local lga_actions = require("telescope-live-grep-args.actions")
telescope.setup {
extensions = {
live_grep_args = {
auto_quoting = true, -- enable/disable auto-quoting
default_mappings = {
i = {
["<C-l>"] = lga_actions.quote_prompt(),
}
}
}
}
}
mappings
→ default_mappings
as mentioned in the configuration section.
Can you give it a try and report back if it works for you?
@weeman1337 Sorry, even as you mean, the default map key (<C-k>
) still works, and the custom shortcut <C-l>
doesn't work.
I gave this a fresh test this morning and it is working fine. Did you call telescope.load_extension("live_grep_args")
after setup @matrix-f ? And please verify you have the latest version.
@weeman1337 Thanks a lot, it's really a version issue. After the version update, the problem is solved, thank you again!
Just a little advise:
1 why not disable by default
2 change the default keybind ,contradicted with the default keybind of telescope
Hi @fzhzhen1987 looks like you missed default_mappings = {}
.
Anyway this issue is still open because I am going to remove all default mappings soon.
Thank u for ur answer.
>looks like you missed default_mappings = {}.
I tested bind ctrl-l for default_mappings = {}.But Ctrl-k and Ctrl-l get the same func.
Ctrl-k still works.....
>Anyway this issue is still open because I am going to remove all default mappings soon.
waiting for that commit. Telescope is very gooood. By the way do u have the plan to build gtags pickers?
Thank u again.
By the way do u have the plan to build gtags pickers?
That would be a question to be asked in the main Telescope tracker.
@fzhzhen1987 can you give this branch a try? #38
@weeman1337
good morning.
I tested commit 1d2137a Remove default mappings.
Default keybind is gone.
Thank u.