1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:00:04 +08:00

fix(rust): rust lsp check typos fix

This commit is contained in:
dqnk 2023-07-03 15:48:38 +00:00 committed by GitHub
parent 344cd372d4
commit a39c6294bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,9 +110,9 @@ endif
function! SpaceVim#layers#lang#rust#plugins() abort
let plugins = []
call add(plugins, [g:_spacevim_root_dir . 'bundle/rust.vim', {'merged' : 0}])
if !spacevim#layers#lsp#check_filetype('rust')
\ && !spacevim#layers#lsp#check_server('rls')
\ && !spacevim#layers#lsp#check_server('rust_analyzer')
if !SpaceVim#layers#lsp#check_filetype('rust')
\ && !SpaceVim#layers#lsp#check_server('rls')
\ && !SpaceVim#layers#lsp#check_server('rust_analyzer')
call add(plugins, ['racer-rust/vim-racer', {'merged' : 0}])
endif
return plugins
@ -202,9 +202,9 @@ function! s:language_specified_mappings() abort
\ . string(function('s:execCMD')) . ', ["cargo fmt"])',
\ 'format project files', 1)
if spacevim#layers#lsp#check_filetype('rust')
\ || spacevim#layers#lsp#check_server('rls')
\ || spacevim#layers#lsp#check_server('rust_analyzer')
if SpaceVim#layers#lsp#check_filetype('rust')
\ || SpaceVim#layers#lsp#check_server('rls')
\ || SpaceVim#layers#lsp#check_server('rust_analyzer')
nnoremap <silent><buffer> K :call SpaceVim#lsp#show_doc()<CR>
nnoremap <silent><buffer> gD :<C-u>call SpaceVim#lsp#go_to_typedef()<Cr>