diff options
| author | Robert Günzler <r@gnzler.io> | 2021-06-11 13:07:35 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-06-11 13:07:35 +0200 |
| commit | 7b57c3bad23f76717a2419cb55305210b76de460 (patch) | |
| tree | 55a2b871a14c0f890b9898158f74c8d07435a33d /.vim | |
| parent | 77f4a590b498322e5475a1dc20d60ef44a9e2a04 (diff) | |
vim: try to use lsp root path for telescope workspace file finder
Diffstat (limited to '.vim')
| -rw-r--r-- | .vim/lua/plugins/_telescope.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/.vim/lua/plugins/_telescope.lua b/.vim/lua/plugins/_telescope.lua index 4841862..44931fa 100644 --- a/.vim/lua/plugins/_telescope.lua +++ b/.vim/lua/plugins/_telescope.lua @@ -48,10 +48,10 @@ nnoremap { ';g', function() end } nnoremap { ';w', function() - local wr = require('lspconfig.util').root_pattern('.git')(vim.fn.expand('%:p')) - require('telescope').extensions.fzf_writer.files({ + require('telescope.builtin').find_files({ + prompt_title = 'workspace', previewer = false, - cwd = wr, + cwd = vim.lsp.buf.list_workspace_folders()[1] or require('lspconfig.util').root_pattern('.git')(vim.fn.expand('%:p')), }) end } |