diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua index 9e55fe2..7939edc 100644 --- a/nvim/lua/plugins/telescope.lua +++ b/nvim/lua/plugins/telescope.lua @@ -6,10 +6,34 @@ return { keys = { { "f", "Telescope find_files", desc = "Find Files" }, { "F", "Telescope ripgrep theme=ivy", desc = "Grep" }, - { "gl", "Telescope git_commits", desc = "Git log" }, - { "gh", "Telescope git_bcommits", desc = "Git history" }, - { "gB", "Telescope git_branches", desc = "Git branches" }, - { "gs", "Telescope git_status", desc = "Git status" }, + { + "gl", + function() + require("telescope.builtin").git_commits({ cwd = vim.fs.root(0, ".git") }) + end, + desc = "Git log" + }, + { + "gh", + function() + require("telescope.builtin").git_bcommits({ cwd = vim.fs.root(0, ".git") }) + end, + desc = "Git history" + }, + { + "gB", + function() + require("telescope.builtin").git_branches({ cwd = vim.fs.root(0, ".git") }) + end, + desc = "Git branches" + }, + { + "gs", + function() + require("telescope.builtin").git_status({ cwd = vim.fs.root(0, ".git") }) + end, + desc = "Git status" + }, { "zh", "Telescope help_tags", desc = "Read help" }, }, after = function()