Configure LSP for rust
This commit is contained in:
parent
d6568a9f53
commit
9ec0257252
@ -14,8 +14,22 @@ function! s:search_under_cursor(query) range
|
|||||||
call rust_doc#open_fuzzy(a:query)
|
call rust_doc#open_fuzzy(a:query)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" keys
|
||||||
nnoremap <buffer><silent><F6> :<C-u>call <SID>search_under_cursor(expand('<cword>'))<CR>
|
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>
|
vnoremap <buffer><silent><F6> "gy:call <SID>search_under_cursor(getreg('g'))<CR>
|
||||||
|
|
||||||
|
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>
|
||||||
|
|
||||||
let g:ale_fixers = { }
|
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user