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 = {
66 path = "~/.local/share/nvim/databases/telescope_history.sqlite3",
69 initial_mode = "insert",
72 horizontal = { preview_width = 0.550000, prompt_position = "top" },
74 vertical = { mirror = false },
77 layout_strategy = "horizontal",
78 path_display = { "absolute" },
80 find_command = { "fd" },
82 prompt_prefix = " ",
83 selection_caret = " ",
84 selection_strategy = "reset",
85 set_env = { COLORTERM = "truecolor" },
86 sorting_strategy = "ascending",
102 find_command = { "fd", "--type=file" },
106 local telescope = require("telescope")
107 telescope.load_extension("conflicts")
108 telescope.load_extension("fzf")
109 telescope.load_extension("live_grep_args")
110 --telescope.load_extension("smart_history")
111 --telescope.load_extension("noice")
116 "<cmd>Telescope find_files<CR>",
117 desc = "Find files [Telescope]",
129 require("telescope").extensions.live_grep_args.live_grep_args()
131 desc = "Live grep [Telescope]",
143 require("telescope-live-grep-args.shortcuts").grep_word_under_cursor()
145 desc = "[G]rep word under [C]ursor [Telescope]",
157 require("telescope.builtin").live_grep({ grep_open_files = true })
159 desc = "Buffers grep [Telescope]",
170 "<cmd>Telescope buffers<CR>",
171 desc = "Buffers [Telescope]",
182 "<cmd>Telescope buffers<CR>",
183 desc = "Buffers [Telescope]",
194 "<cmd>Telescope help_tags<CR>",
195 desc = "Help tags [Telescope]",
206 "<cmd>Telescope<CR>",
207 desc = "Open [Telescope]",
218 "<cmd>Telescope resume<CR>",
219 desc = "Resume (previous search) [Telescope]",
230 "<cmd>Telescope git_commits<CR>",
231 desc = "Git commits [Telescope]",
242 "<cmd>Telescope git_bcommits<CR>",
243 desc = "Git buffer commits [Telescope]",
254 "<cmd>Telescope git_branches<CR>",
255 desc = "Git branches [Telescope]",
266 "<cmd>Telescope git_status<CR>",
267 desc = "Git status [Telescope]",
278 "<cmd>Telescope git_stash<CR>",
279 desc = "Git stash [Telescope]",
290 "<cmd>Telescope lsp_document_symbols<CR>",
291 desc = "LSP Document Symbols [Telescope]",
302 "<cmd>Telescope lsp_workspace_symbols<CR>",
303 desc = "LSP Workspace Symbols [Telescope]",
314 "<cmd>Telescope lsp_references<CR>",
315 desc = "LSP References [Telescope]",
326 "<cmd>Telescope lsp_implementations<CR>",
327 desc = "LSP Implementations [Telescope]",
338 "<cmd>Telescope lsp_definitions<CR>",
339 desc = "LSP Definitions [Telescope]",
350 "<cmd>Telescope lsp_type_definitions<CR>",
351 desc = "LSP Type Definitions [Telescope]",
362 "<cmd>Telescope diagnostics<CR>",
363 desc = "Diagnostics [Telescope]",
374 "<cmd>Telescope treesitter<CR>",
375 desc = "Treesitter [Telescope]",