Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions autoload/SpaceVim/layers/lang/rust.vim
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions docs/layers/lang/rust.md
Expand Up @@ -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.

Expand Down