nvim: add telescope plugin

This commit is contained in:
dogeystamp 2023-12-03 12:50:05 -05:00
parent f066082b30
commit f86c799de7
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
3 changed files with 14 additions and 0 deletions

View File

@ -116,6 +116,10 @@ highlight GitGutterAdd ctermfg=green
highlight GitGutterChange ctermfg=yellow
highlight GitGutterDelete ctermfg=red
" fancy picker stuff
source $XDG_CONFIG_HOME/nvim/telescope.vim
call plug#end()
source $XDG_CONFIG_HOME/nvim/color.vim

View File

@ -38,6 +38,7 @@ local on_attach = function(client, bufnr)
buf_set_keymap('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
buf_set_keymap('n', '<space>ss', '<cmd>lua vim.lsp.buf.workspace_symbol()<CR>', opts)
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)

View File

@ -0,0 +1,9 @@
Plug 'nvim-telescope/telescope.nvim', { 'branch': '0.1.x' }
Plug 'nvim-lua/plenary.nvim', { 'branch': '0.1.x' }
nnoremap <leader>ef <cmd>Telescope find_files<cr>
nnoremap <leader>eg <cmd>Telescope live_grep<cr>
nnoremap <leader>em <cmd>Telescope buffers<cr>
nnoremap <leader>eh <cmd>Telescope help_tags<cr>
nnoremap <leader>es <cmd>Telescope lsp_document_symbols<cr>
nnoremap <leader>eb <cmd>Telescope keymaps<cr>