From d8ee12c48895e3ec97df5ceaa7450b0a1e710e87 Mon Sep 17 00:00:00 2001 From: Julian T Date: Mon, 3 Jun 2019 13:46:18 +0200 Subject: Added vim completion, changed walpaper and switched search engine --- vim/.vimrc | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'vim/.vimrc') diff --git a/vim/.vimrc b/vim/.vimrc index 6e7b7ce..d4d24d3 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -14,7 +14,14 @@ set shellslash Plugin 'VundleVim/Vundle.vim' " Completion - Plugin 'Valloric/YouCompleteMe' + Plugin 'autozimu/LanguageClient-neovim' + if has('nvim') + Plugin 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } + else + Plugin 'Shougo/deoplete.nvim' + Plugin 'roxma/nvim-yarp' + Plugin 'roxma/vim-hug-neovim-rpc' + endif Plugin 'tpope/vim-surround' Plugin 'tpope/vim-repeat' @@ -43,6 +50,16 @@ set shellslash colorscheme horizon +" Completion +let g:LanguageClient_serverCommands = { + \ 'rust': ['/usr/bin/rustup', 'run', 'stable', 'rls' ], + \ 'c': ['/usr/bin/cquery', '--log-file=/tmp/cq.log', '--init={"cacheDirectory":"/tmp/cquery/"}' ] + \ } + +let g:LanguageClient_useVirtualText = 0 +let g:LanguageClient_diagnosticsEnable = 0 +let g:deoplete#enable_at_startup = 1 + syntax enable set number relativenumber @@ -53,7 +70,6 @@ set noexpandtab let g:tex_flavor='latex' - if has('nvim') set inccommand=split endif @@ -84,8 +100,16 @@ set completeopt=menuone,preview " Keymapping map :NERDTreeToggle map :TagbarToggle - inoremap pumvisible() ? "\" : "\" - inoremap pumvisible() ? "\" : "\" + + inoremap pumvisible() ? "\" : "\" + inoremap pumvisible() ? "\" : "\\" + inoremap pumvisible() ? "\" : "\\" + + nnoremap :call LanguageClient_contextMenu() + nnoremap K :call LanguageClient#textDocument_hover() + nnoremap gd :call LanguageClient#textDocument_definition() + nnoremap :call LanguageClient#textDocument_rename() + nnoremap :b " When moving more lines make it a jump. If couns i 2 it will run m'2j, @@ -108,3 +132,6 @@ set completeopt=menuone,preview autocmd BufRead,BufNewFile *.ino set filetype=c autocmd BufRead,BufNewFile *.asc set filetype=asciidoc autocmd FileType python setlocal completeopt-=preview + +" Path settings + let g:ycm_rust_src_path = '~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src' -- cgit v1.2.3