Revert "Revert "nvim""

This reverts commit 1f46b1d2ed.
This commit is contained in:
Nikos Papadakis 2023-06-15 22:03:46 +03:00
parent 1f46b1d2ed
commit 8b67fce61c
Signed by untrusted user who does not match committer: nikos
GPG key ID: 78871F9905ADFF02
2 changed files with 15 additions and 8 deletions

View file

@ -4,8 +4,6 @@ if not ok then
return return
end end
local nmap = require("my.utils").nmap
telescope.setup { telescope.setup {
extensions = { extensions = {
fzf = { fzf = {
@ -49,10 +47,10 @@ local function dotfiles()
} }
end end
nmap("<C-p>", project, "Find project files")
nmap("<Leader>fn", dotfiles, "Dotfiles")
nmap("<Leader><C-p>", builtin.git_files, "Find git files")
nmap("<Leader>fg", builtin.live_grep, "Live grep")
nmap("<Leader>gs", builtin.git_status, "Git status")
telescope.load_extension("fzf") telescope.load_extension("fzf")
require("my.keymaps").telescope_keymaps {
project = project,
dotfiles = dotfiles,
builtin = builtin,
}

View file

@ -75,6 +75,15 @@ local function lsp_keymaps(client, bufnr)
end end
end end
local function telescope_keymaps(fns)
nmap("<C-p>", fns.project, "Find project files")
nmap("<Leader>fn", fns.dotfiles, "Dotfiles")
nmap("<Leader><C-p>", fns.builtin.git_files, "Find git files")
nmap("<Leader>fg", fns.builtin.live_grep, "Live grep")
nmap("<Leader>gs", fns.builtin.git_status, "Git status")
end
return { return {
lsp_keymaps = lsp_keymaps, lsp_keymaps = lsp_keymaps,
telescope_keymaps = telescope_keymaps,
} }