From 8b8d4c7c13cb8143526aa6f3bc8059ff5e86368c Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Fri, 3 May 2019 11:57:00 +0200 Subject: [PATCH] Replaced youcompleteme with LanguageClient_neovim --- vim/vimrc | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 5715ca9..9c9e126 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -14,7 +14,14 @@ endif " vim-plug plugins call plug#begin('~/.vim/vim-plug') -Plug 'valloric/youcompleteme', { 'do': './install.py --clang-completer' } +" deoplete +Plug 'Shougo/deoplete.nvim' +Plug 'roxma/nvim-yarp' +Plug 'roxma/vim-hug-neovim-rpc' + +" LanguageClient-neovim +Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh', } + Plug 'rhysd/vim-clang-format' Plug 'derekwyatt/vim-fswitch' Plug 'itchyny/lightline.vim' @@ -54,11 +61,20 @@ nnoremap " autotag let g:autotagmaxTagsFileSize = 1024 * 1024 * 128 -" youcomleteme config -let g:ycm_autoclose_preview_window_after_insertion = 1 -let g:ycm_autoclose_preview_window_after_completion = 1 +" deoplete +let g:deoplete#enable_at_startup = 1 +call deoplete#custom#source('_', 'matchers', ['matcher_full_fuzzy']) +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" -nmap :YcmCompleter GoTo +" LanguageClient-neovim +set hidden +nnoremap :call LanguageClient_contextMenu() +nnoremap :call LanguageClient#textDocument_definition() +let g:LanguageClient_serverCommands = { + \ 'python': ['pyls'], + \ 'cpp': ['clangd'], + \ } " lightline config let g:lightline = { 'colorscheme': 'solarized' } @@ -82,11 +98,6 @@ hi Terminal ctermfg=fg ctermbg=NONE guifg=fg guibg=NONE guisp=NONE cterm=NONE gu " incremental searching set incsearch set hlsearch -"augroup vimrc-incsearch-highlight -" autocmd! -" autocmd CmdlineEnter /,\? :set hlsearch -" autocmd CmdlineLeave /,\? :set nohlsearch -"augroup END " asynrun.vim let g:asyncrun_open = 16