30 lines
913 B
Lua
30 lines
913 B
Lua
local telescope = require('telescope')
|
|
local builtin = require('telescope.builtin')
|
|
|
|
telescope.setup {
|
|
defaults = {
|
|
vimgrep_arguments = { 'rg',
|
|
'--hidden', '--color=never', '--no-heading',
|
|
'--with-filename', '--line-number',
|
|
'--column', '--smart-case',
|
|
},
|
|
},
|
|
}
|
|
|
|
local find_files_workspace = function()
|
|
builtin.find_files({
|
|
search_dirs = vim.lsp.buf.list_workspace_folders(),
|
|
prompt_prefix = "🔍",
|
|
})
|
|
end
|
|
local live_grep_workspace = function()
|
|
builtin.live_grep({
|
|
search_dirs = vim.lsp.buf.list_workspace_folders(),
|
|
})
|
|
end
|
|
|
|
vim.keymap.set('n', '<leader>ff', find_files_workspace, {})
|
|
vim.keymap.set('n', '<leader>fg', live_grep_workspace, {})
|
|
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
|
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
|
vim.keymap.set('n', '<leader>fl', builtin.git_files, {})
|