https://github.com/heavenshell/vim-inhibitor
My Rust plugins.
https://github.com/heavenshell/vim-inhibitor
rust vim vim-plugin
Last synced: 4 days ago
JSON representation
My Rust plugins.
- Host: GitHub
- URL: https://github.com/heavenshell/vim-inhibitor
- Owner: heavenshell
- License: bsd-3-clause
- Created: 2019-05-26T11:54:05.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-11-05T14:21:52.000Z (over 5 years ago)
- Last Synced: 2026-03-06T05:01:01.017Z (4 months ago)
- Topics: rust, vim, vim-plugin
- Language: Vim script
- Size: 5.55 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-inhibitor
[](https://travis-ci.org/heavenshell/vim-inhibitor)
My Rust plugins.

## Lint
Use `cargo check` or `clippy`.
```vim
:Inhibitor
```
If error raised, vim-inhibitor add errors to QuickFix.
You can open with `:cwindow` command.
### More prettify
Also you can open with `:InhibitorErrors` more prettify errors.
## Format
Use `rustfmt`.
```vim
:InhibitorFmt
```
Also you can use `rls`'s `textDocument/formatting`.
## Completion, definition
Use `rls` and `vim-lsp`.
```vim
augroup RLS
let g:lsp_async_completion = 0
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'rls',
\ 'cmd': {server_info -> ['rustup', 'run', 'stable', 'rls']},
\ 'workspace_config': {'rust': {'clippy_preference': 'on'}},
\ 'root_uri':{server_info -> lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'Cargo.toml'))},
\ 'whitelist': ['rust'],
\ })
autocmd FileType rust setlocal omnifunc=lsp#complete
autocmd FileType rust nnoremap c :LspDocumentDiagnostics
autocmd FileType rust nnoremap d :LspDefinition
autocmd FileType rust nnoremap h :LspHover
augroup END
```
## License
New BSD License