dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit b413e7c0bb5288b464a025e2df922ac3bd07b211
parent a9e7b42056e5283e1855d97367e7999063a0f730
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Thu,  9 Jun 2022 17:35:16 +0200

vim: add a rust plugin

I didn't feel like figuring out errorformat all by myself. Rust already
did that for me.

Diffstat:
Mvim/after/ftplugin/rust.vim | 9+++++++--
Mvim/vimrc | 3+++
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/vim/after/ftplugin/rust.vim b/vim/after/ftplugin/rust.vim @@ -1,5 +1,10 @@ +if exists('g:loaded_dispatch') + nnoremap <buffer> <leader>mm :Make build<CR> +else + nnoremap <buffer> <leader>mm :make build<CR> +endif setlocal formatprg=rustfmt -setlocal makeprg=cargo\ build setlocal keywordprg=rustup\ doc let b:undo_ftplugin = (exists('b:undo_ftplugin') ? b:undo_ftplugin.'|' : '') -let b:undo_ftplugin .= 'setlocal formatprg< makeprg< keywordprg<' +let b:undo_ftplugin .= 'setlocal formatprg< keywordprg<' +let b:undo_ftplugin .= '| nunmap <buffer> <leader>mm' diff --git a/vim/vimrc b/vim/vimrc @@ -156,6 +156,9 @@ Plug 'dense-analysis/ale' Plug 'Yggdroot/indentLine', { 'for': 'python' } Plug 'jceb/vim-orgmode', { 'for': 'org' } + +" Rust +Plug 'rust-lang/rust.vim', { 'for': 'rust' } call plug#end() " quickfix filtering