diff --git a/modules/editor/neovim/lua/keybinds.lua b/modules/editor/neovim/lua/keybinds.lua index 89a5cfa..eb199db 100644 --- a/modules/editor/neovim/lua/keybinds.lua +++ b/modules/editor/neovim/lua/keybinds.lua @@ -29,29 +29,31 @@ key("v", "", ":m '>+1gv=gv") key("v", "", ":m '<-2gv=gv") -- Telescope (fuzzy finder) -key("n", "k", ":Telescope keymaps") -key("n", "/", ":Telescope live_grep") -key("n", "ff", ":Telescope find_files") -key("n", "fp", ":Telescope git_files") +local telescope = require("telescope.builtin") +local telescope_ext = require("telescope").extensions +key("n", "k", telescope.keymaps) +key("n", "/", telescope.live_grep) +key("n", "ff", telescope.find_files) +key("n", "fp", telescope.git_files) key("n", "fN", find_notes) key("n", "N", grep_notes) key("n", "fD", find_downloads) -key("n", "fa", ":Telescope file_browser") -key("n", "fw", ":Telescope grep_string") -key("n", "wt", ":Telescope tmux sessions") -key("n", "ww", ":Telescope tmux windows") -key("n", "w/", ":Telescope tmux pane_contents") -key("n", "fz", ":Telescope zoxide list") -key("n", "b", ":Telescope buffers") -key("n", "hh", ":Telescope help_tags") -key("n", "fr", ":Telescope oldfiles") -key("n", "cc", ":Telescope commands") -key("n", "cr", "lua command_history()") -key("n", "s", ":Telescope current_buffer_fuzzy_find") -key("n", "gc", ":Telescope git_commits") -key("n", "gf", ":Telescope git_bcommits") -key("n", "gb", ":Telescope git_branches") -key("n", "gs", ":Telescope git_status") +key("n", "fa", telescope_ext.file_browser.file_browser) +key("n", "fw", telescope.grep_string) +-- key("n", "wt", ":Telescope tmux sessions") +-- key("n", "ww", ":Telescope tmux windows") +-- key("n", "w/", ":Telescope tmux pane_contents") +key("n", "fz", telescope_ext.zoxide.list) +key("n", "b", telescope.buffers) +key("n", "hh", telescope.help_tags) +key("n", "fr", telescope.oldfiles) +key("n", "cc", telescope.commands) +key("n", "cr", command_history) +key("n", "s", telescope.current_buffer_fuzzy_find) +key("n", "gc", telescope.git_commits) +key("n", "gf", telescope.git_bcommits) +key("n", "gb", telescope.git_branches) +key("n", "gs", telescope.git_status) -- Buffer tabs (tmux interferes) -- key("n", "", "gt") @@ -64,12 +66,12 @@ key("n", "gd", vim.lsp.buf.definition, { silent = true }) key("n", "gT", vim.lsp.buf.type_definition, { silent = true }) key("n", "gi", vim.lsp.buf.implementation, { silent = true }) key("n", "gh", vim.lsp.buf.hover, { silent = true }) -key("n", "gr", "Telescope lsp_references", { silent = true }) -key("n", "R", "lua vim.lsp.buf.rename()", { silent = true }) -key("n", "]e", "lua vim.diagnostic.goto_next()", { silent = true }) -key("n", "[e", "lua vim.diagnostic.goto_prev()", { silent = true }) -key("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", { silent = true }) -key("n", "E", "lua vim.lsp.buf.code_action()", { silent = true }) +key("n", "gr", telescope.lsp_references, { silent = true }) +key("n", "R", vim.lsp.buf.rename, { silent = true }) +key("n", "]e", vim.diagnostic.goto_next, { silent = true }) +key("n", "[e", vim.diagnostic.goto_prev, { silent = true }) +key("n", "e", vim.lsp.diagnostic.show_line_diagnostics, { silent = true }) +key("n", "E", vim.lsp.buf.code_action, { silent = true }) -- File commands key("n", "q", ":quit") diff --git a/modules/editor/neovim/lua/packer/telescope.lua b/modules/editor/neovim/lua/packer/telescope.lua index 06b18f7..8136dee 100644 --- a/modules/editor/neovim/lua/packer/telescope.lua +++ b/modules/editor/neovim/lua/packer/telescope.lua @@ -28,9 +28,8 @@ M.packer = function(use) }, extensions = { fzy_native = {}, - tmux = {}, + -- tmux = {}, zoxide = {}, - --neoclip = {}, project = { base_dirs = { "~/dev" }, }, @@ -43,7 +42,7 @@ M.packer = function(use) use("nvim-telescope/telescope-fzy-native.nvim") -- Jump around tmux sessions - use("camgraff/telescope-tmux.nvim") + -- use("camgraff/telescope-tmux.nvim") -- Jump directories use({