summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Teu <julianteule@gmail.com>2018-05-28 17:58:55 +0200
committerJulian Teu <julianteule@gmail.com>2018-05-28 17:58:55 +0200
commitf3b30e4c373a69e531dbda0a22e530356a20b5bc (patch)
tree39eac2437a0a07b2deaa79a9cdde8e27edcf33d6
parent52e2dced1db54a3f65daadaebd322410b3bdbae8 (diff)
Added rust support
-rw-r--r--.vimrc13
1 files changed, 13 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index 349160a..84fdb1c 100644
--- a/.vimrc
+++ b/.vimrc
@@ -11,6 +11,8 @@ call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
+Plugin 'autozimu/LanguageClient-neovim'
+
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-speeddating'
@@ -83,3 +85,14 @@ nnoremap <silent> ge :call ToEnd()<cr>
nnoremap <silent> gb :call ToBegin()<cr>
map <C-n> :NERDTreeToggle<CR>
+
+" Required for operations modifying multiple buffers like rename.
+set hidden
+
+let g:LanguageClient_serverCommands = {
+ \ 'rust': ['rustup', 'run', 'stable', 'rls'],
+ \ }
+
+nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
+nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
+nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>