diff --git a/init.vim b/init.vim index 5ac10dd..47cee4c 100644 --- a/init.vim +++ b/init.vim @@ -11,6 +11,17 @@ Plug 'Shougo/neosnippet.vim' Plug 'honza/vim-snippets' Plug 'vim-scripts/a.vim' Plug 'luochen1990/rainbow' +if has("win32") + Plug 'autozimu/LanguageClient-neovim', { + \ 'branch': 'next', + \ 'do': 'powershell -executionpolicy bypass -File install.ps1', + \ } +else + Plug 'autozimu/LanguageClient-neovim', { + \ 'branch': 'next', + \ 'do': 'bash install.sh', + \ } +end call plug#end() " =============Settings================== filetype plugin on @@ -122,3 +133,11 @@ let g:rainbow_conf = { \} \} +" ===================LanguageServer================== +let g:LanguageClient_serverCommands = { + \ 'cpp': ['clangd'], + \ } +nnoremap K :call LanguageClient#textDocument_hover() +nnoremap gd :call LanguageClient#textDocument_definition() +nnoremap :call LanguageClient_contextMenu() +vnoremap :call LanguageClient_contextMenu()