Fix telescope.

This commit is contained in:
Mariano Uvalle 2022-02-21 14:35:14 -08:00
parent da37bd815e
commit b42bad8f1b
4 changed files with 11 additions and 5 deletions

View file

@ -17,6 +17,6 @@ require('lsp.go-ls')
-- Completion -- Completion
require('nv-compe') require('nv-compe')
require('nv-indent-blankline')
require('nv-prettier') require('nv-prettier')
require('nv-telescope')

View file

@ -31,7 +31,9 @@ vim.api.nvim_set_keymap('n', '<Leader><Leader>', '<C-^>', {noremap = true, silen
-- Find files inside the current folder. -- Find files inside the current folder.
vim.api.nvim_set_keymap('n', '<Leader>ff', '<cmd>Telescope find_files<cr>',{}) vim.api.nvim_set_keymap('n', '<Leader>ff', '<cmd>Telescope find_files<cr>',{})
-- Find files and folders allowing creation. -- Find files and folders allowing creation.
vim.api.nvim_set_keymap('n', '<Leader>fb', '<cmd>Telescope file_browser<cr>',{}) vim.api.nvim_set_keymap('n', '<Leader>fb', '<cmd>Telescope file_browser<cr>', {noremap = true})
-- File brosers starting at the cwd.
vim.api.nvim_set_keymap('n', '<Leader>fc', '<cmd>Telescope file_browser path=%:p:h<cr>', {noremap = true})
-- Do a grep search in the current folder. -- Do a grep search in the current folder.
vim.api.nvim_set_keymap('n', '<Leader>ps', '<cmd>Telescope live_grep<cr>',{}) vim.api.nvim_set_keymap('n', '<Leader>ps', '<cmd>Telescope live_grep<cr>',{})
-- Search among the currently open buffers. -- Search among the currently open buffers.

View file

@ -0,0 +1 @@
require("telescope").load_extension "file_browser"

View file

@ -50,12 +50,15 @@ return require('packer').startup(function(use)
} }
use 'airblade/vim-rooter' use 'airblade/vim-rooter'
-- Telescope
use { "nvim-telescope/telescope-file-browser.nvim" }
use { use {
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}} requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}},
} }
-- Diagnostics -- Diagnostics
-- Lua -- Lua
use { use {