From e1e143bc63895d96fa9dc86416437d11ba130e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 7 Apr 2024 14:24:58 +0200 Subject: nvim: improve telescope file open --- config/nvim/init.vim | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'config/nvim/init.vim') diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 491ae47..77e572d 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -136,20 +136,13 @@ let g:UltiSnipsJumpBackwardTrigger='' " Telescope nnoremap :Telescope buffers -nnoremap :call TelescopeFiles() +nnoremap :lua require('mytelescopefiles')() nnoremap :Telescope lsp_document_symbols nmap ] :Telescope lsp_definitions nmap ] :Telescope lsp_type_definitions nmap [ :Telescope lsp_implementations nmap [ :Telescope lsp_references nmap :Telescope diagnostics bufnr=0 -function TelescopeFiles() - if stridx(system('git rev-parse --is-inside-work-tree 2>/dev/null || true'), 'true') != -1 - lua require('telescope.builtin').git_files{use_file_path=true,git_command={"sh","-c","git ls-files -c --recurse-submodules && git ls-files -o --exclude-standard"}} - else - lua require('telescope.builtin').find_files{} - endif -endfunction " Copy line location nmap c :let @+=expand("%:p") . ":" . line(".") -- cgit v1.2.3