vim-rust: init
This commit is contained in:
parent
54141dd96e
commit
e198d616be
3 changed files with 77 additions and 14 deletions
46
derivations/dev/vim-rust.nix
Normal file
46
derivations/dev/vim-rust.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ commonRC
|
||||
, rustc
|
||||
, racerd,
|
||||
... } @ args :
|
||||
|
||||
import ../../pkg-configuration/vim-derivates/vim.nix (args // {
|
||||
name = "vim-for-rust";
|
||||
additionalRC = commonRC + ''
|
||||
set statusline+=%#warningmsg#
|
||||
set statusline+=%{SyntasticStatuslineFlag()}
|
||||
set statusline+=%*
|
||||
|
||||
let g:syntastic_always_populate_loc_list = 1
|
||||
let g:syntastic_auto_loc_list = 1
|
||||
let g:syntastic_check_on_open = 1
|
||||
let g:syntastic_check_on_wq = 0
|
||||
|
||||
" tagbar
|
||||
let g:tagbar_type_rust = {
|
||||
\ 'ctagstype' : 'rust',
|
||||
\ 'kinds' : [
|
||||
\'T:types,type definitions',
|
||||
\'f:functions,function definitions',
|
||||
\'g:enum,enumeration names',
|
||||
\'s:structure names',
|
||||
\'m:modules,module names',
|
||||
\'c:consts,static constants',
|
||||
\'t:traits,traits',
|
||||
\'i:impls,trait implementations',
|
||||
\]
|
||||
\}
|
||||
|
||||
let g:syntastic_rust_checkers = ["rustc"]
|
||||
|
||||
"rustfmt
|
||||
let g:rustfmt_autosave = 1
|
||||
|
||||
let g:ycm_auto_trigger = 1
|
||||
let g:ycm_rust_src_path = '${rustc.src}/src'
|
||||
let g:ycm_racerd_binary_path = '${racerd.out}/bin/racerd'
|
||||
|
||||
'';
|
||||
additionalPlugins = [
|
||||
"rust-vim"
|
||||
];
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue