diff --git a/.vimrc.common.epilogue b/.vimrc.common.epilogue index 87c1fb53..b64a9bd2 100644 --- a/.vimrc.common.epilogue +++ b/.vimrc.common.epilogue @@ -1,5 +1,7 @@ call plug#end() +let g:deoplete#enable_at_startup = 1 + " line ending set fileformats=unix,dos @@ -28,7 +30,11 @@ endif if executable('rg') let g:ackprg = 'rg --no-heading --vimgrep' - set grepprg=rg\ --vimgrep + set grepprg=rg\ -i\ --vimgrep + + " Ripgrep on / + command! -nargs=+ -complete=file -bar Rg silent! grep! |cwindow|redraw! + nnoremap / :Rg endif if executable('rls') @@ -40,8 +46,26 @@ if executable('rls') endif " fzf -command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --color "always" '.shellescape().'| tr -d "\017"', 1, 0) -nmap :Find +if executable('rg') + let $FZF_DEFAULT_COMMAND = 'rg --files --no-messages "" .' + set grepprg=rg\ --vimgrep +endif + +let g:fzf_command_prefix = 'Fzf' +if executable('fzf') + nnoremap v :FzfFiles + nnoremap u :FzfTags + nnoremap j :call fzf#vim#tags("'".expand('')) + + if executable('rg') + " :Find runs `rg ` and passes it to fzf + command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(), 1, 0) + nnoremap / :Find + nnoremap ' :execute "Find " . expand("") + endif +else + nnoremap v :CtrlP +endif " appearance set number @@ -50,6 +74,23 @@ set laststatus=2 set noshowmode set showtabline=1 "only show tabline when more than 1 tab +set statusline+=%#warningmsg# +set statusline+=%{SyntasticStatuslineFlag()} +set statusline+=%* + +" syntastic +let g:syntastic_always_populate_loc_list = 1 +let g:syntastic_aggregate_errors = 1 +let g:syntastic_auto_loc_list = 1 +let g:syntastic_check_on_open = 1 +let g:syntastic_check_on_wq = 0 + +let g:syntastic_rust_checkers=['cargo'] + +" language server +let g:LanguageClient_autoStart = 1 +let g:LanguageClient_serverCommands = { 'rust': ['rustup', 'run', 'nightly', 'rls'] } + " exclude quickfix from the buffers list augroup qf autocmd! diff --git a/.vimrc.common.plugins b/.vimrc.common.plugins index 30f2bb36..5e95b6e7 100644 --- a/.vimrc.common.plugins +++ b/.vimrc.common.plugins @@ -19,3 +19,8 @@ Plug 'prabirshrestha/async.vim' Plug 'prabirshrestha/vim-lsp' Plug 'prabirshrestha/asyncomplete.vim' Plug 'prabirshrestha/asyncomplete-lsp.vim' +Plug 'Shougo/deoplete.nvim' +Plug 'roxma/nvim-yarp' +Plug 'roxma/vim-hug-neovim-rpc' +Plug 'vim-syntastic/syntastic' + diff --git a/common/configure_fresh_system.sh b/common/configure_fresh_system.sh index 20a63b99..b26385e6 100755 --- a/common/configure_fresh_system.sh +++ b/common/configure_fresh_system.sh @@ -205,6 +205,8 @@ if [[ -z $NOPYTHON3 ]]; then set -e echo "Installing Nikola" $SUDO $PIP install --upgrade pygments-style-solarized ws4py watchdog webassets Nikola + echo "Installing vim dependencies" + $SUDO $PIP install neovim fi if [[ -z $USER ]]; then