my_nvim_config/after/plugin/telescope.lua

34 lines
1.5 KiB
Lua
Raw Normal View History

2024-10-08 16:25:35 -04:00
local actions = require('telescope.actions')
require('telescope').setup{
defaults = {
mappings = {
i = {
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
["<ESC>"] = actions.close,
},
},
}
}
2024-02-04 20:53:56 -05:00
local builtin = require('telescope.builtin')
2024-04-17 22:15:13 -04:00
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = "Find files" })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = "Find in live grep" })
vim.keymap.set('n', '<leader>faf',
function()
require('telescope.builtin').find_files({ hidden = true, additional_args = { "-u" } })
end, { desc = "Find all files(including ignored files)" })
vim.keymap.set('n', '<leader>fag',
function()
require('telescope.builtin').live_grep({ additional_args = { "-u" } })
end, { desc = "Find in live grep(including ignored files)" })
2024-04-17 22:15:13 -04:00
vim.keymap.set('n', '<leader>fs', builtin.grep_string, { desc = "Find string" })
vim.keymap.set('n', '<leader>fas',
function()
require('telescope.builtin').grep_string({ additional_args = { "-u" } })
end, { desc = "Find all strings(including ignored files)" })
2024-04-17 22:15:13 -04:00
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = "Find from help" })
2024-10-08 16:25:35 -04:00
2024-12-24 17:14:23 -05:00
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
vim.keymap.set("n", "<leader>cn", "<cmd>cnext<CR>",{ desc = 'Quick Fix Next' })
vim.keymap.set("n", "<leader>cp", "<cmd>cprevious<CR>",{ desc = 'Quick Fix Previous' })