1 -- Find, Filter, Preview, Pick. All lua, all the time.
2 -- https://github.com/nvim-telescope/telescope.nvim
9 vim.cmd.packadd("telescope-fzf-native.nvim")
10 vim.cmd.packadd("telescope-git-conflicts.nvim")
11 vim.cmd.packadd("telescope-live-grep-args.nvim")
12 --vim.cmd.packadd("sqlite-lua") -- For telescope-smart-history.nvim
13 --vim.cmd.packadd("telescope-smart-history.nvim")
16 vim.g.loaded_telescope = nil
19 local actions = require("telescope.actions")
20 local lga_actions = require("telescope-live-grep-args.actions")
21 require("telescope").setup({
23 color_devicons = false,
27 fuzzy = true, -- false will only do exact matching
28 --override_generic_sorter = true, -- override the generic sorter
29 --override_file_sorter = true, -- override the file sorter
30 --case_mode = "smart_case", -- or "ignore_case" or "respect_case"
31 -- the default case_mode is "smart_case"
37 -- Usage/FixMe: does not seem to be triggered
38 ["<C-k>"] = lga_actions.quote_prompt(),
39 ["<C-g>"] = lga_actions.quote_prompt({ postfix = " --iglob " }),
40 -- freeze the current list and start a fuzzy search in the frozen list
41 ["<C-space>"] = lga_actions.to_fuzzy_refine,
44 -- ... also accepts theme settings, for example:
45 -- theme = "dropdown", -- use dropdown theme
46 -- theme = { }, -- use own theme spec
47 -- layout_config = { mirror=true }, -- mirror preview pane
52 ["<C-Up>"] = actions.cycle_history_prev,
53 ["<C-Down>"] = actions.cycle_history_next,
54 -- ["<esc>"] = actions.close,
57 file_ignore_patterns = {
67 path = "~/.local/share/nvim/databases/telescope_history.sqlite3",
70 initial_mode = "insert",
73 horizontal = { preview_width = 0.550000, prompt_position = "top" },
75 vertical = { mirror = false },
78 layout_strategy = "horizontal",
79 path_display = { "absolute" },
81 find_command = { "fd" },
83 prompt_prefix = " ",
84 selection_caret = " ",
85 selection_strategy = "reset",
86 set_env = { COLORTERM = "truecolor" },
87 sorting_strategy = "ascending",
104 find_command = { "fd", "--type=file" },
108 local telescope = require("telescope")
109 telescope.load_extension("conflicts")
110 telescope.load_extension("fzf")
111 telescope.load_extension("live_grep_args")
112 --telescope.load_extension("smart_history")
113 --telescope.load_extension("noice")
118 "<cmd>Telescope find_files<CR>",
119 desc = "Find files [Telescope]",
131 require("telescope").extensions.live_grep_args.live_grep_args()
133 desc = "Live grep [Telescope]",
145 require("telescope-live-grep-args.shortcuts").grep_word_under_cursor()
147 desc = "[G]rep word under [C]ursor [Telescope]",
159 require("telescope.builtin").live_grep({ grep_open_files = true })
161 desc = "Buffers grep [Telescope]",
172 "<cmd>Telescope buffers<CR>",
173 desc = "Buffers [Telescope]",
184 "<cmd>Telescope buffers<CR>",
185 desc = "Buffers [Telescope]",
196 "<cmd>Telescope help_tags<CR>",
197 desc = "Help tags [Telescope]",
208 "<cmd>Telescope<CR>",
209 desc = "Open [Telescope]",
220 "<cmd>Telescope resume<CR>",
221 desc = "Resume (previous search) [Telescope]",
232 "<cmd>Telescope git_commits<CR>",
233 desc = "Git commits [Telescope]",
244 "<cmd>Telescope git_bcommits<CR>",
245 desc = "Git buffer commits [Telescope]",
256 "<cmd>Telescope git_branches<CR>",
257 desc = "Git branches [Telescope]",
268 "<cmd>Telescope git_status<CR>",
269 desc = "Git status [Telescope]",
280 "<cmd>Telescope git_stash<CR>",
281 desc = "Git stash [Telescope]",
292 "<cmd>Telescope lsp_document_symbols<CR>",
293 desc = "LSP Document Symbols [Telescope]",
304 "<cmd>Telescope lsp_workspace_symbols<CR>",
305 desc = "LSP Workspace Symbols [Telescope]",
316 "<cmd>Telescope lsp_references<CR>",
317 desc = "LSP References [Telescope]",
328 "<cmd>Telescope lsp_implementations<CR>",
329 desc = "LSP Implementations [Telescope]",
340 "<cmd>Telescope lsp_definitions<CR>",
341 desc = "LSP Definitions [Telescope]",
352 "<cmd>Telescope lsp_type_definitions<CR>",
353 desc = "LSP Type Definitions [Telescope]",
364 "<cmd>Telescope diagnostics<CR>",
365 desc = "Diagnostics [Telescope]",
376 "<cmd>Telescope treesitter<CR>",
377 desc = "Treesitter [Telescope]",