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 = {
68 path = "~/.local/share/nvim/databases/telescope_history.sqlite3",
71 initial_mode = "insert",
74 horizontal = { preview_width = 0.550000, prompt_position = "top" },
76 vertical = { mirror = false },
79 layout_strategy = "horizontal",
80 path_display = { "absolute" },
82 find_command = { "fd" },
84 prompt_prefix = " ",
85 selection_caret = " ",
86 selection_strategy = "reset",
87 set_env = { COLORTERM = "truecolor" },
88 sorting_strategy = "ascending",
105 find_command = { "fd", "--type=file" },
109 local telescope = require("telescope")
110 --telescope.load_extension("conflicts")
111 telescope.load_extension("fzf")
112 telescope.load_extension("live_grep_args")
113 --telescope.load_extension("smart_history")
114 --telescope.load_extension("noice")
119 "<cmd>Telescope find_files<CR>",
120 desc = "Find files [Telescope]",
132 require("telescope").extensions.live_grep_args.live_grep_args()
134 desc = "Live grep [Telescope]",
146 require("telescope-live-grep-args.shortcuts").grep_word_under_cursor()
148 desc = "[G]rep word under [C]ursor [Telescope]",
160 require("telescope.builtin").live_grep({ grep_open_files = true })
162 desc = "Buffers grep [Telescope]",
173 "<cmd>Telescope buffers<CR>",
174 desc = "Buffers [Telescope]",
185 "<cmd>Telescope buffers<CR>",
186 desc = "Buffers [Telescope]",
197 "<cmd>Telescope help_tags<CR>",
198 desc = "Help tags [Telescope]",
209 "<cmd>Telescope<CR>",
210 desc = "Open [Telescope]",
221 "<cmd>Telescope resume<CR>",
222 desc = "Resume (previous search) [Telescope]",
233 "<cmd>Telescope git_commits<CR>",
234 desc = "Git commits [Telescope]",
245 "<cmd>Telescope git_bcommits<CR>",
246 desc = "Git buffer commits [Telescope]",
257 "<cmd>Telescope git_branches<CR>",
258 desc = "Git branches [Telescope]",
269 "<cmd>Telescope git_status<CR>",
270 desc = "Git status [Telescope]",
281 "<cmd>Telescope git_stash<CR>",
282 desc = "Git stash [Telescope]",
293 "<cmd>Telescope lsp_document_symbols<CR>",
294 desc = "LSP Document Symbols [Telescope]",
305 "<cmd>Telescope lsp_workspace_symbols<CR>",
306 desc = "LSP Workspace Symbols [Telescope]",
317 "<cmd>Telescope lsp_references<CR>",
318 desc = "LSP References [Telescope]",
329 "<cmd>Telescope lsp_implementations<CR>",
330 desc = "LSP Implementations [Telescope]",
341 "<cmd>Telescope lsp_definitions<CR>",
342 desc = "LSP Definitions [Telescope]",
353 "<cmd>Telescope lsp_type_definitions<CR>",
354 desc = "LSP Type Definitions [Telescope]",
365 "<cmd>Telescope diagnostics<CR>",
366 desc = "Diagnostics [Telescope]",
377 "<cmd>Telescope treesitter<CR>",
378 desc = "Treesitter [Telescope]",