From f86c799de7b5963fbdd71cb9fc6ecf7ab60a07f1 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Sun, 3 Dec 2023 12:50:05 -0500 Subject: [PATCH] nvim: add telescope plugin --- src/.config/nvim/init.vim | 4 ++++ src/.config/nvim/lua/init.lua | 1 + src/.config/nvim/telescope.vim | 9 +++++++++ 3 files changed, 14 insertions(+) create mode 100644 src/.config/nvim/telescope.vim diff --git a/src/.config/nvim/init.vim b/src/.config/nvim/init.vim index bdd1f11..a3f6fb1 100755 --- a/src/.config/nvim/init.vim +++ b/src/.config/nvim/init.vim @@ -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 diff --git a/src/.config/nvim/lua/init.lua b/src/.config/nvim/lua/init.lua index 065eb9d..fabd416 100644 --- a/src/.config/nvim/lua/init.lua +++ b/src/.config/nvim/lua/init.lua @@ -38,6 +38,7 @@ local on_attach = function(client, bufnr) buf_set_keymap('n', 'gs', 'lua vim.lsp.buf.signature_help()', opts) buf_set_keymap('n', 'gt', 'lua vim.lsp.buf.type_definition()', opts) buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) + buf_set_keymap('n', 'ss', 'lua vim.lsp.buf.workspace_symbol()', opts) buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) buf_set_keymap('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) diff --git a/src/.config/nvim/telescope.vim b/src/.config/nvim/telescope.vim new file mode 100644 index 0000000..cfe7a33 --- /dev/null +++ b/src/.config/nvim/telescope.vim @@ -0,0 +1,9 @@ +Plug 'nvim-telescope/telescope.nvim', { 'branch': '0.1.x' } +Plug 'nvim-lua/plenary.nvim', { 'branch': '0.1.x' } + +nnoremap ef Telescope find_files +nnoremap eg Telescope live_grep +nnoremap em Telescope buffers +nnoremap eh Telescope help_tags +nnoremap es Telescope lsp_document_symbols +nnoremap eb Telescope keymaps