nvimdotfiles/after/plugin/telescope.lua
2023-10-16 17:14:55 +02:00

17 lines
461 B
Lua

local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fs', function()
local searchstring
vim.ui.input({ prompt = 'Grep: ' }, function(input)
searchstring = input
end);
if (searchstring == nil or searchstring == '') then
return
end
builtin.grep_string({ search = searchstring });
end)
vim.keymap.set('v', '<leader>fs', builtin.grep_string);