dotfiles/home/.config/nvim/lua/plugins/telescope.lua
Marko Korhonen c99903e78e
Tweak neovim config
- Add noice, navic
- Tweak theme configuration
- Tweak cder configuration
- Update .ignore file
2023-11-17 08:04:37 +02:00

44 lines
1.1 KiB
Lua

return function()
local telescope = require("telescope")
local builtin = require("telescope.builtin")
telescope.setup({
pickers = {
find_files = { find_command = { "fd", "-Ht", "f" } },
lsp_references = { show_line = false },
live_grep = {
additional_args = function(opts)
return { "--hidden" }
end,
},
},
extensions = {
cder = {
previewer_command = "eza "
.. "-a "
.. "--color=always "
.. "-T "
.. "--level=3 "
.. "--icons "
.. "--git-ignore "
.. "--long "
.. "--no-permissions "
.. "--no-user "
.. "--no-filesize "
.. "--git "
.. "--ignore-glob=.git",
dir_command = { "fd", "-Ht", "d", ".", os.getenv("HOME") },
},
},
})
telescope.load_extension("fzf")
telescope.load_extension("ui-select")
telescope.load_extension("cder")
-- Keybinds
vim.keymap.set("n", "<C-s>", vim.cmd.Telescope)
vim.keymap.set("n", "<C-f>", builtin.find_files)
vim.keymap.set("n", "<C-g>", builtin.live_grep)
end