1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// vim:fileencoding=utf-8:noet
//! Port of `powerline/segments/vim/plugin/syntastic.py`.
// from __future__ import (unicode_literals, division, absolute_import, print_function) // py:2
// try: import vim except ImportError: vim = object() // py:4-7
// from powerline.segments.vim import window_cached // py:9
// from powerline.bindings.vim import vim_global_exists // py:10
use cratevim_global_exists;
use Value;
/// Port of `syntastic()` from
/// `powerline/segments/vim/plugin/syntastic.py:14`.
///
/// Show whether syntastic has found any errors or warnings.
///
/// :param err_format: Format string for errors.
/// :param warn_format: Format string for warnings.
///
/// Highlight groups used: `syntastic:warning` or `warning`,
/// `syntastic:error` or `error`.
///
/// Rust port: without vim.eval, returns `None` when `g:SyntasticLoclist`
/// isn't defined (matches py:24 short-circuit). The error/warning
/// extraction logic (py:26-44) is preserved structurally for when
/// vim integration lands.