diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 3b9a28f..e2cb811 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -23,6 +23,11 @@ Plug 'mxw/vim-jsx' Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' +" Telescope +Plug 'nvim-lua/popup.nvim' +Plug 'nvim-lua/plenary.nvim' +Plug 'nvim-telescope/telescope.nvim' + " Defines the sneak motion Plug 'justinmk/vim-sneak' @@ -227,7 +232,7 @@ nnoremap p :CocListResume " FZF -let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --no-ignore-vcs' +let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --no-ignore-vcs -g "!.git/" -g "!node_modules/"' " NerdTree @@ -238,15 +243,6 @@ let NERDTreeCustomOpenArgs={'file':{'where': 't'}} autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | \ quit | endif -" Start NERDTree when Vim is started without file arguments. -autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif - -" Start NERDTree when Vim starts with a directory argument. -autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | - \ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif - " Mirror the NERDTree before showing it. This makes it the same on all tabs. nnoremap :NERDTreeMirror:NERDTreeFind @@ -276,11 +272,12 @@ vnoremap :m '>+1gv=gv vnoremap :m '<-2gv=gv " ctrl shift f (Find in directory) -nnoremap :Rg -vnoremap :Rg +nnoremap Telescope live_grep +vnoremap Telescope live_grep " ctrl p (Find file) -nnoremap :Files +nnoremap Telescope find_files +vnoremap Telescope find_files " Use yank to copy to clipboard vnoremap y "*y