local utility_misc = require("utility.misc") vim.keymap.set("n", "p", function() if vim.fn.win_gettype() ~= "" or vim.fn.win_getid() == vim.g.term_win then -- Window is not a normal window or is a terminal window return end require("telescope.builtin").find_files() end) vim.keymap.set("n", "b", function () if vim.fn.win_gettype() ~= "" or vim.fn.win_getid() == vim.g.term_win then -- Window is not a normal window or is a terminal window return end require("telescope.builtin").buffers() end) vim.keymap.set("n", "gc", function () require("telescope.builtin").git_commits() end) vim.keymap.set("n", "gb", function() require("telescope.builtin").git_branches() end) vim.keymap.set("n", "gcl", function() require("telescope.builtin").conflicts() end) vim.keymap.set("n", "f", function() if vim.fn.win_gettype() ~= "" or vim.fn.win_getid() == vim.g.term_win then -- Window is not a normal window or is a terminal window return end require("telescope.builtin").live_grep() end) vim.keymap.set("n", "e", function() if vim.fn.win_gettype() ~= "" or vim.fn.win_getid() == vim.g.term_win then -- Window is not a normal window or is a terminal window return end require("telescope").extensions.file_browser.file_browser() end) vim.keymap.set("n", "E", function() if vim.fn.win_gettype() ~= "" or vim.fn.win_getid() == vim.g.term_win then -- Window is not a normal window or is a terminal window return end local curr_buf_dir = utility_misc.dir_name(vim.api.nvim_buf_get_name(0)) require("telescope").extensions.file_browser.file_browser({ path = curr_buf_dir }) end)