2024-08-11 01:40:33 +01:00
|
|
|
return {
|
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
|
|
|
|
|
tag = "0.1.5",
|
|
|
|
|
|
|
|
dependencies = {
|
|
|
|
"nvim-lua/plenary.nvim"
|
|
|
|
},
|
|
|
|
|
|
|
|
config = function()
|
2024-08-25 21:17:07 +01:00
|
|
|
-- Disable on Windows
|
|
|
|
if (package.config:sub(1,1) == "\\") then return end
|
2024-08-11 01:40:33 +01:00
|
|
|
require('telescope').setup({})
|
|
|
|
|
|
|
|
local builtin = require('telescope.builtin')
|
|
|
|
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
|
|
|
|
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
|
|
|
|
vim.keymap.set('n', '<leader>pws', function()
|
|
|
|
local word = vim.fn.expand("<cword>")
|
|
|
|
builtin.grep_string({ search = word })
|
|
|
|
end)
|
|
|
|
vim.keymap.set('n', '<leader>pWs', function()
|
|
|
|
local word = vim.fn.expand("<cWORD>")
|
|
|
|
builtin.grep_string({ search = word })
|
|
|
|
end)
|
|
|
|
vim.keymap.set('n', '<leader>ps', function()
|
|
|
|
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
|
|
|
end)
|
|
|
|
vim.keymap.set('n', '<leader>vh', builtin.help_tags, {})
|
|
|
|
end
|
|
|
|
}
|
|
|
|
|