Rust completion with deoplete
This commit is contained in:
parent
9ebf392548
commit
282cea9bab
@ -1,5 +1,3 @@
|
|||||||
let g:rustfmt_autosave = 0
|
|
||||||
|
|
||||||
let g:tagbar_ctags_bin = '/usr/bin/universal-ctags'
|
let g:tagbar_ctags_bin = '/usr/bin/universal-ctags'
|
||||||
|
|
||||||
let g:rust_doc#define_map_K = 0
|
let g:rust_doc#define_map_K = 0
|
||||||
@ -15,13 +13,13 @@ function! s:search_under_cursor(query) range
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" keys
|
" keys
|
||||||
nnoremap <buffer><silent><F6> :<C-u>call <SID>search_under_cursor(expand('<cword>'))<CR>
|
nnoremap <buffer><silent><F7> :<C-u>call <SID>search_under_cursor(expand('<cword>'))<CR>
|
||||||
vnoremap <buffer><silent><F6> "gy:call <SID>search_under_cursor(getreg('g'))<CR>
|
vnoremap <buffer><silent><F7> "gy:call <SID>search_under_cursor(getreg('g'))<CR>
|
||||||
|
|
||||||
nnoremap <F3> :call LanguageClient_contextMenu()<CR>
|
nnoremap <F3> :call LanguageClient_contextMenu()<CR>
|
||||||
nnoremap <silent> <F4> :call LanguageClient#textDocument_definition()<CR>
|
nnoremap <silent> <F4> :call LanguageClient#textDocument_definition()<CR>
|
||||||
nnoremap <silent> <F7> :call LanguageClient#textDocument_hover()<CR>
|
nnoremap <silent> <F6> :call LanguageClient#textDocument_hover()<CR>
|
||||||
nnoremap <silent> <F6> :call LanguageClient#textDocument_rename()<CR>
|
nnoremap <silent> <F8> :call LanguageClient#textDocument_rename()<CR>
|
||||||
|
|
||||||
|
|
||||||
let g:LanguageClient_autoStart = 1
|
let g:LanguageClient_autoStart = 1
|
||||||
@ -29,7 +27,18 @@ let g:LanguageClient_autoStart = 1
|
|||||||
let g:LanguageClient_serverCommands = {
|
let g:LanguageClient_serverCommands = {
|
||||||
\ 'rust': ['rustup', 'run', 'nightly', 'rls'] }
|
\ 'rust': ['rustup', 'run', 'nightly', 'rls'] }
|
||||||
|
|
||||||
|
let g:LanguageClient_diagnosticsEnable = 0
|
||||||
|
|
||||||
let g:ale_linters = {'rust': ['rls']}
|
let g:ale_linters = {'rust': ['rls']}
|
||||||
let g:ale_fixers = { 'rust': ['rustfmt'] }
|
let g:ale_fixers = { 'rust': ['rustfmt'] }
|
||||||
|
|
||||||
|
let g:ale_fix_on_save = 0
|
||||||
let g:autofmt_autosave = 0
|
let g:autofmt_autosave = 0
|
||||||
|
|
||||||
|
" deoplete
|
||||||
|
call deoplete#custom#option('sources',{
|
||||||
|
\ '_': ['buffer'],
|
||||||
|
\ 'rust': ['ultisnips', 'buffer', 'file', 'LanguageClient']
|
||||||
|
\ })
|
||||||
|
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
||||||
|
call deoplete#enable()
|
||||||
|
2
vimrc
2
vimrc
@ -59,7 +59,7 @@ Plug 'LucHermitte/local_vimrc'
|
|||||||
|
|
||||||
" completion
|
" completion
|
||||||
Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --go-completer --rust-completer --system-boost --system-libclang',
|
Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --go-completer --rust-completer --system-boost --system-libclang',
|
||||||
\ 'for': ['c', 'python', 'sh', 'go', 'clojure', 'rust'],
|
\ 'for': ['c', 'python', 'sh', 'go', 'clojure'],
|
||||||
\ }
|
\ }
|
||||||
" deoplete for haskell
|
" deoplete for haskell
|
||||||
if has('nvim')
|
if has('nvim')
|
||||||
|
Loading…
Reference in New Issue
Block a user