1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 21:00:03 +08:00

feat(layer): Add cargo-clippy to Rust layer

This commit is contained in:
Grafcube 2022-01-25 18:52:30 +05:30 committed by GitHub
parent 0b50d07109
commit 29c10f0b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -70,6 +70,7 @@
" SPC l c B cargo-bench
" SPC l c D cargo-docs
" SPC l c r cargo-run
" SPC l c l cargo-clippy
" <
"
" This layer also provides REPL support for rust, the key bindings are:
@ -182,6 +183,9 @@ function! s:language_specified_mappings() abort
call SpaceVim#mapping#space#langSPC('nnoremap', ['l','c', 't'], 'call call('
\ . string(function('s:execCMD')) . ', ["cargo test"])',
\ 'cargo-test', 1)
call SpaceVim#mapping#space#langSPC('nnoremap', ['l','c', 'l'], 'call call('
\ . string(function('s:execCMD')) . ', ["cargo clippy"])',
\ 'cargo-clippy', 1)
call SpaceVim#mapping#space#langSPC('nnoremap', ['l','c', 'u'], 'call call('
\ . string(function('s:execCMD')) . ', ["cargo update"])',
\ 'update-external-dependencies', 1)

View File

@ -77,6 +77,7 @@ To use this configuration layer, update your custom configuration file with:
| `SPC l c B` | Run `cargo bench` |
| `SPC l c D` | Run `cargo doc` |
| `SPC l c r` | Run `cargo run` |
| `SPC l c l` | Run `cargo clippy` |
**Note:** `SPC l g` and `SPC l v` will not be available if the `lsp` layer is not enabled.