Files
naps62 933ffe7cf5 fix(picker): actually disable telescope
Telescope ships in NvChad's own plugin set, so dropping it from neogit's
dependencies never removed it — it kept reinstalling. Disable it the same
way nvim-tree is disabled, and repoint the ten NvChad mappings that drove
it: five are already covered by fzf.lua bindings and are dropped, the
other five move to fzf-lua.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 13:00:35 +00:00

55 lines
1.4 KiB
Lua

require "nvchad.mappings"
local map = vim.keymap.set
-- remove nvim-tree mappings (nvim-tree disabled; using yazi instead, see plugins/yazi.lua)
vim.keymap.del("n", "<leader>e")
vim.keymap.del("n", "<C-n>")
vim.keymap.del("n", "<leader>rn")
map("n", "<leader>rn", vim.lsp.buf.rename, { desc = "LSP Rename" })
-- NvChad binds these to telescope, which is not installed (fzf-lua is the picker).
-- Drop them all, then restore the ones fzf.lua does not already cover.
for _, lhs in ipairs {
"<leader>ff",
"<leader>fw",
"<leader>fb",
"<leader>fh",
"<leader>fo",
"<leader>fz",
"<leader>ma",
"<leader>cm",
"<leader>gt",
"<leader>pt",
} do
pcall(vim.keymap.del, "n", lhs)
end
local function fzf(picker)
return function()
require("fzf-lua")[picker]()
end
end
map("n", "<leader>fo", fzf "oldfiles", { desc = "Old files" })
map("n", "<leader>fh", fzf "helptags", { desc = "Help tags" })
map("n", "<leader>fz", fzf "blines", { desc = "Find in current buffer" })
map("n", "<leader>ma", fzf "marks", { desc = "Marks" })
map("n", "<leader>cm", fzf "git_commits", { desc = "Git commits" })
map("n", ";", ":", { desc = "CMD enter command mode" })
-- close current buffer
map("n", "<leader>q", ":q<cr>")
-- go back to normal mode
map("i", "jj", "<Esc>")
map("i", "jk", "<Esc>")
--save file
map("n", "<C-s>", ":update<CR>")
map("i", "<C-s>", "<C-o>:update<CR><Esc>")
-- remove search highlight
map("n", "<leader>,", ":noh<cr>")