1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 15:19:12 +08:00

Rust support (#3430)

* Fix rust support

* Update rust layer
This commit is contained in:
Wang Shidong 2020-04-03 22:51:04 +08:00 committed by GitHub
parent 93376f0b7e
commit e2530924ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,9 +61,11 @@
function! SpaceVim#layers#lang#rust#plugins() abort
let plugins = [
\ ['racer-rust/vim-racer', { 'on_ft' : 'rust' }],
\ ['rust-lang/rust.vim', { 'on_ft' : 'rust', 'merged' : 1 }],
\ ['rust-lang/rust.vim', { 'on_ft' : 'rust', 'merged' : 0 }],
\ ]
if !SpaceVim#layers#lsp#check_filetype('rust')
call add(plugins, ['racer-rust/vim-racer', {'merged' : 0}])
endif
return plugins
endfunction
@ -72,7 +74,7 @@ function! SpaceVim#layers#lang#rust#config() abort
\ 'rustc %s -o #TEMP#',
\ '#TEMP#'])
call SpaceVim#plugins#repl#reg('rust', 'evcxr')
let g:racer_experimental_completer = 1
" let g:racer_experimental_completer = 1
let g:racer_cmd = s:racer_cmd ==# ''
\ ? get(g:, 'racer_cmd', $HOME . '/.cargo/bin/racer')
\ : s:racer_cmd