How to unmap default mappings for Telescope plugin?
LinuxIsCool opened this issue · comments
How can I unmap these keys?
NvChad/lua/nvchad/mappings.lua
Line 66 in 156eeef
In previous nvchad I had in mappings.lua
:
---@type MappingsTable
local M = {}
M.disabled = {
n = {
["<leader>f"] = "",
["<leader>ff"] = "",
["<leader>fg"] = "",
["<leader>fb"] = "",
["<leader>fh"] = "",
["<leader>fa"] = "",
["<leader>fm"] = "",
["<leader>fo"] = "",
["<leader>fw"] = "",
["<leader>fz"] = "",
},
}
return M
Now I'm trying in mappings.lua
:
require "nvchad.mappings"
-- Disable mappings
local nomap = vim.keymap.del
nomap("n", "<leader>f")
nomap("n", "<leader>fa")
nomap("n", "<leader>fb")
nomap("n", "<leader>ff")
nomap("n", "<leader>fh")
nomap("n", "<leader>fm")
nomap("n", "<leader>fo")
nomap("n", "<leader>fw")
nomap("n", "<leader>fz")
But getting error:
Error executing vim.schedule lua callback: vim/keymap.lua:0: E31: No such mapping
stack traceback:
[C]: in function 'nvim_del_keymap'
vim/keymap.lua: in function 'nomap'
/home/ygg/.config/nvim/lua/mappings.lua:6: in main chunk
[C]: in function 'require'
/home/ygg/.config/nvim/init.lua:38: in function </home/ygg/.config/nvim/init.l
ua:37>
Furthermore, how can I simply disable Telescope?
check the list of mappins in nvchad first, there is no such mapping as leader f
I don't understand your answer. I linked directly to the mapping.
It's in NvChad/lua/nvchad/mappings.lua
And you can see it with whichkey as well.
I would like to unmap <leader>f as a prefix, thus I would like to unmap all those mappings that begin with <leader>f.
Vim.keymap.Del has nothing to do with prefixes , its which key stuff