Skip to content

Commit 8d93f18

Browse files
BurntSushialexcrichton
authored andcommitted
---
yaml --- r: 152565 b: refs/heads/try2 c: b5d9e94 h: refs/heads/master i: 152563: 9fb10a0 v: v3
1 parent b63bcbf commit 8d93f18

File tree

3 files changed

+58
-1
lines changed

3 files changed

+58
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: ebde8cfa618756ee615cb543c832b53653ce2977
8+
refs/heads/try2: b5d9e941f52c67b8628f9044da7c24371335a15d
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
" Vim syntastic plugin helper
2+
" Language: Rust
3+
" Maintainer: Andrew Gallant <[email protected]>
4+
5+
if exists("g:loaded_syntastic_rust_filetype")
6+
finish
7+
endif
8+
let g:loaded_syntastic_rust_filetype = 1
9+
let s:save_cpo = &cpo
10+
set cpo&vim
11+
12+
" This is to let Syntastic know about the Rust filetype.
13+
" It enables tab completion for the 'SyntasticInfo' command.
14+
" (This does not actually register the syntax checker.)
15+
if exists('g:syntastic_extra_filetypes')
16+
call add(g:syntastic_extra_filetypes, 'rust')
17+
else
18+
let g:syntastic_extra_filetypes = ['rust']
19+
endif
20+
21+
let &cpo = s:save_cpo
22+
unlet s:save_cpo
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
" Vim syntastic plugin
2+
" Language: Rust
3+
" Maintainer: Andrew Gallant <[email protected]>
4+
"
5+
" See for details on how to add an external Syntastic checker:
6+
" https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide#external
7+
8+
if exists("g:loaded_syntastic_rust_rustc_checker")
9+
finish
10+
endif
11+
let g:loaded_syntastic_rust_rustc_checker = 1
12+
13+
let s:save_cpo = &cpo
14+
set cpo&vim
15+
16+
function! SyntaxCheckers_rust_rustc_GetLocList() dict
17+
let makeprg = self.makeprgBuild({ 'args': '--parse-only' })
18+
19+
let errorformat =
20+
\ '%E%f:%l:%c: %\d%#:%\d%# %.%\{-}error:%.%\{-} %m,' .
21+
\ '%W%f:%l:%c: %\d%#:%\d%# %.%\{-}warning:%.%\{-} %m,' .
22+
\ '%C%f:%l %m,' .
23+
\ '%-Z%.%#'
24+
25+
return SyntasticMake({
26+
\ 'makeprg': makeprg,
27+
\ 'errorformat': errorformat })
28+
endfunction
29+
30+
call g:SyntasticRegistry.CreateAndRegisterChecker({
31+
\ 'filetype': 'rust',
32+
\ 'name': 'rustc'})
33+
34+
let &cpo = s:save_cpo
35+
unlet s:save_cpo

0 commit comments

Comments
 (0)