From 2bed3702371c1a024d310b2928761922d661df9e Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 20 Jan 2023 05:47:47 +0000 Subject: Add telescope.vim to configuration. --- init.vim | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/init.vim b/init.vim index c5312e7..b6b306f 100644 --- a/init.vim +++ b/init.vim @@ -35,6 +35,9 @@ Plug 'onsails/lspkind.nvim' Plug 'nvim-tree/nvim-tree.lua' Plug 'vim-airline/vim-airline' +Plug 'nvim-lua/plenary.nvim' +Plug 'nvim-telescope/telescope.nvim' + Plug 'git://git.josher.dev/fieldmarshal.vim.git' if has('rneovim') Plug 'git://git.josher.dev/rneovim-userregs.git' @@ -43,7 +46,6 @@ Plug 'git@git.josher.dev:config.vim.git', { 'dir': g:plug_home . '/config.vim' } call plug#end() - set termguicolors set shiftwidth=2 set tabstop=2 @@ -51,22 +53,27 @@ set expandtab set nowrap set splitright set wildmode=longest,list,full +set scrolloff=8 let mapleader=" " noremap % v noremap " s noremap Y y$ +noremap ú FormatCode +noremap p (SynStack) +noremap ff Telescope find_files + augroup InitVim au! autocmd BufRead *.java,*.c,*.cpp,*.cxx TSBufEnable highlight autocmd TermOpen * startinsert + autocmd TextYankPost * + \ lua require'vim.highlight'.on_yank( + \ { higroup = "IncSearch", timeout = 100 }); augroup END -noremap ú FormatCode -noremap p (SynStack) - " Local configuration that can be set by hostname or just a local " configuration. @@ -86,8 +93,8 @@ if filereadable(printf('%s/.config/nvim/local.vim', $HOME)) exec "source " . printf('%s/.config/nvim/local.vim', $HOME) endif -map nt NvimTreeToggle -noremap nE :e =expand('%:h')/ +noremap nt NvimTreeToggle +noremap NE :e =expand('%:h')/ if has('rneovim') hi ColorColumn guifg=#3a3a3a guibg=none gui=None @@ -113,4 +120,21 @@ lua << EOF -- Diagnostics require("diagnostics") require("nvim-tree").setup() + + require('telescope').setup({ + defaults = { + layout_strategy = "center", + results_title = false, + sorting_strategy = "ascending", + layout_config = { + center = { + width = 0.5, + height = 0.5, + }, + -- other layout configuration here + }, + -- other defaults configuration here + }, + -- other configuration values here + }) EOF -- cgit