2018-05-26 17:18:09 +00:00
|
|
|
let g:rustfmt_autosave = 0
|
|
|
|
|
|
|
|
let g:tagbar_ctags_bin = '/usr/bin/universal-ctags'
|
|
|
|
|
|
|
|
let g:rust_doc#define_map_K = 0
|
|
|
|
let g:rust_doc#downloaded_rust_doc_dir = '~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu'
|
|
|
|
|
|
|
|
function! s:search_under_cursor(query) range
|
|
|
|
if a:query ==# ''
|
|
|
|
echomsg "rust-doc: No identifier is found under the cursor"
|
|
|
|
return
|
|
|
|
endif
|
|
|
|
|
|
|
|
call rust_doc#open_fuzzy(a:query)
|
|
|
|
endfunction
|
|
|
|
|
2018-06-12 15:46:40 +00:00
|
|
|
" keys
|
2018-05-26 17:18:09 +00:00
|
|
|
nnoremap <buffer><silent><F6> :<C-u>call <SID>search_under_cursor(expand('<cword>'))<CR>
|
|
|
|
vnoremap <buffer><silent><F6> "gy:call <SID>search_under_cursor(getreg('g'))<CR>
|
|
|
|
|
2018-06-12 15:46:40 +00:00
|
|
|
nnoremap <F3> :call LanguageClient_contextMenu()<CR>
|
|
|
|
nnoremap <silent> <F4> :call LanguageClient#textDocument_definition()<CR>
|
|
|
|
nnoremap <silent> <F7> :call LanguageClient#textDocument_hover()<CR>
|
|
|
|
nnoremap <silent> <F6> :call LanguageClient#textDocument_rename()<CR>
|
2018-05-26 17:18:09 +00:00
|
|
|
|
2018-06-12 15:46:40 +00:00
|
|
|
|
|
|
|
let g:LanguageClient_autoStart = 1
|
|
|
|
|
|
|
|
let g:LanguageClient_serverCommands = {
|
|
|
|
\ 'rust': ['rustup', 'run', 'nightly', 'rls'] }
|
|
|
|
|
|
|
|
let g:ale_linters = {'rust': ['rls']}
|
|
|
|
let g:ale_fixers = { 'rust': ['rustfmt'] }
|
|
|
|
|
|
|
|
let g:autofmt_autosave = 0
|