diff --git a/nvim/lua/plugins/nav/telescope.lua b/nvim/lua/plugins/nav/telescope.lua index 05e3e5f..8cf09fc 100755 --- a/nvim/lua/plugins/nav/telescope.lua +++ b/nvim/lua/plugins/nav/telescope.lua @@ -1,140 +1,157 @@ return { - -- fuzzy finder - "nvim-telescope/telescope.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - { - "nvim-telescope/telescope-live-grep-args.nvim", - -- This will not install any breaking changes. - -- For major updates, this must be adjusted manually. - version = "^1.0.0", - }, - }, - event = { "LspAttach" }, - keys = { - { - "ff", - function() - require("telescope.builtin").find_files() - end, - desc = "Telescope find files", - }, + -- fuzzy finder + "nvim-telescope/telescope.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + { + "nvim-telescope/telescope-live-grep-args.nvim", + -- This will not install any breaking changes. + -- For major updates, this must be adjusted manually. + version = "^1.0.0", + }, + }, + event = { "LspAttach" }, + keys = { + { + "ff", + function() + require("telescope.builtin").find_files() + end, + desc = "Telescope find files", + }, - { - "flg", - function() - require("telescope.builtin").live_grep() - end, - desc = "Telescope live grep", - }, + { + "fu", + function() + require("telescope.builtin").lsp_references() + end, + desc = "Telescope Usage (references)", + }, - { - "fg", - function() - require("telescope").extensions.live_grep_args.live_grep_args() - end, - desc = "Telescope live grep args", - }, + { + "flg", + function() + require("telescope.builtin").live_grep() + end, + desc = "Telescope live grep", + }, - { - "fb", - function() - require("telescope.builtin").buffers() - end, - desc = "Telescope buffers", - }, + { + "fg", + function() + require("telescope").extensions.live_grep_args.live_grep_args() + end, + desc = "Telescope live grep args", + }, - { - "fh", - function() - require("telescope.builtin").help_tags() - end, - desc = "Telescope nvim functions", - }, + { + "fb", + function() + require("telescope.builtin").buffers() + end, + desc = "Telescope buffers", + }, - { "ft", ":TodoTelescope", desc = "Telescope TODOs" }, + { + "fh", + function() + require("telescope.builtin").help_tags() + end, + desc = "Telescope nvim functions", + }, - -- Git - { - "fld", - function() - require("telescope.builtin").git_status() - end, - desc = "Telescope git diff", - }, + { "ft", ":TodoTelescope", desc = "Telescope TODOs" }, - { - "flc", - function() - require("telescope.builtin").git_commits() - end, - desc = "Telescope git commits", - }, + -- Git + { + "fld", + function() + require("telescope.builtin").git_status() + end, + desc = "Telescope git diff", + }, - { - "flf", - function() - require("telescope.builtin").git_files() - end, - desc = "Telescope git files", - }, + { + "flc", + function() + require("telescope.builtin").git_commits() + end, + desc = "Telescope git commits", + }, - -- Recent Commands - { "foc", ":Telescope command_history", desc = "Telescope recent commands" }, + { + "flf", + function() + require("telescope.builtin").git_files() + end, + desc = "Telescope git files", + }, - -- Recent Searches - { "fos", ":Telescope search_history", desc = "Telescope recent searches" }, + -- Recent Commands + { "foc", ":Telescope command_history", desc = "Telescope recent commands" }, - -- Old Files - { - "fr", - function() - require("telescope.builtin").oldfiles() - end, - desc = "Telescope recent files", - }, + -- Recent Searches + { "fos", ":Telescope search_history", desc = "Telescope recent searches" }, - -- Quickfix Items - { "fq", ":Telescope quickfix", desc = "Telescope quickfix items" }, + -- Old Files + { + "fr", + function() + require("telescope.builtin").oldfiles() + end, + desc = "Telescope recent files", + }, - -- Spell Suggestions - { "fs", ":Telescope spell_suggest", desc = "Telescope spellsuggestions" }, + -- Quickfix Items + { "fq", ":Telescope quickfix", desc = "Telescope quickfix items" }, - -- Diagnostics - { "fd", ":Telescope diagnostics", desc = "Telescope Diagnostics" }, + -- Spell Suggestions + { "fs", ":Telescope spell_suggest", desc = "Telescope spellsuggestions" }, - -- Notifications - { "fn", ":Telescope notify", desc = "Telescope Notifications" }, + -- Diagnostics + { "fd", ":Telescope diagnostics", desc = "Telescope Diagnostics" }, - -- Implementations - { "fi", ":Telescope lsp_implementations", desc = "Telescope lsp implementations" }, - }, - config = function() - local actions = require("telescope.actions") - local telescope = require("telescope") - local lga_actions = require("telescope-live-grep-args.actions") + -- Notifications + { "fn", ":Telescope notify", desc = "Telescope Notifications" }, - telescope.setup({ - defaults = { - mappings = { - i = { - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - [""] = actions.smart_add_to_qflist, - [""] = actions.smart_send_to_qflist, - [""] = lga_actions.quote_prompt(), - }, - }, - path_display = { "truncate" }, - }, - extensions = { - frecency = { - db_safe_mode = false, - matcher = "fuzzy", - }, - }, - }) + -- Implementations + { "fi", ":Telescope lsp_implementations", desc = "Telescope lsp implementations" }, - telescope.load_extension("live_grep_args") - end, + -- References + { + "fu", + function() + require("telescope.builtin").lsp_references() + end, + desc = "Telescope Usage (references)", + }, + }, + config = function() + local actions = require("telescope.actions") + local telescope = require("telescope") + local lga_actions = require("telescope-live-grep-args.actions") + + telescope.setup({ + defaults = { + mappings = { + i = { + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.smart_add_to_qflist, + [""] = actions.smart_send_to_qflist, + [""] = lga_actions.quote_prompt(), + }, + }, + path_display = { "truncate" }, + }, + extensions = { + frecency = { + db_safe_mode = false, + matcher = "fuzzy", + }, + }, + }) + + telescope.load_extension("live_grep_args") + end, }