Add telescope (replace NerdTree and fzf), add SnipRun with notify support

This commit is contained in:
Edward Litherland-Smith 2022-09-14 09:39:21 +01:00
parent baf5437059
commit a386f19c19
2 changed files with 21 additions and 13 deletions

View file

@ -27,3 +27,13 @@ function _lazygit_toggle()
end
vim.api.nvim_set_keymap("n", ",g", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true})
-- aerial telescope integration
require('telescope').load_extension('aerial')
-- SnipRun config
require('sniprun').setup{
display = {
"NvimNotify"
}
}

View file

@ -13,13 +13,11 @@ call plug#begin()
" Make sure you use single quotes
Plug 'nvim-lua/plenary.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'sonph/onehalf', {'rtp': 'vim/'}
Plug 'mileszs/ack.vim'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'stevearc/aerial.nvim'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-fugitive'
@ -36,6 +34,10 @@ Plug 'hrsh7th/cmp-cmdline'
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-vsnip'
Plug 'hrsh7th/vim-vsnip'
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.0' }
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
Plug 'rcarriga/nvim-notify'
Plug 'michaelb/sniprun', {'do': 'bash install.sh'}
" Initialize plugin system
call plug#end()
@ -46,7 +48,6 @@ let g:python3_host_prog = '~/.pyenv/versions/neovim3/bin/python'
luafile ~/.vim/init.lua
luafile ~/.vim/lsp_config.lua
map ; :Files<CR>
if executable('ag')
let g:ackprg = 'ag --vimgrep'
endif
@ -88,16 +89,13 @@ filetype plugin indent on
imap jk <Esc>
command Bd b# | bd #
command! BufOnly silent! execute "%bd|e#|bd#"
nnoremap <Leader>b :buffers<CR>:buffer<Space>
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <leader>; :call aerial#fzf()<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
nnoremap <Leader>a :Ack!<Space>
" Exit Vim if NERDTree is the only window remaining in the only tab.
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
nnoremap <leader>fk <cmd>Telescope aerial<cr>
nnoremap <leader>fd <cmd>Telescope lsp_document_symbols<cr>
set splitbelow
set splitright