File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
branches/snap-stage3/src/etc/vim Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 07183ea6e719e18f5d6b09afbe519c9f940c4705
4
+ refs/heads/snap-stage3: 184fa42d33ab53cc37f7fc315105ae7de3c70c9a
5
5
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -33,4 +33,11 @@ if exists("g:ftplugin_rust_source_path")
33
33
let &l: path= g: ftplugin_rust_source_path . ' ,' . &l: path
34
34
endif
35
35
36
- let b: undo_ftplugin = " setlocal formatoptions< comments< commentstring< includeexpr< suffixesadd<"
36
+ if exists (" g:loaded_delimitMate" )
37
+ if exists (" b:delimitMate_excluded_regions" )
38
+ let b: rust_original_delimitMate_excluded_regions = b: delimitMate_excluded_regions
39
+ endif
40
+ let b: delimitMate_excluded_regions = delimitMate#Get (" excluded_regions" ) . ' ,rustLifetimeCandidate,rustGenericLifetimeCandidate'
41
+ endif
42
+
43
+ let b: undo_ftplugin = " setlocal formatoptions< comments< commentstring< includeexpr< suffixesadd< | if exists('b:rust_original_delimitMate_excluded_regions') | let b:delimitMate_excluded_regions = b:rust_original_delimitMate_excluded_regions | unlet b:rust_original_delimitMate_excluded_regions | else | unlet b:delimitMate_excluded_regions | endif"
Original file line number Diff line number Diff line change @@ -113,6 +113,11 @@ syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\(f\|f32\|f64\)\>
113
113
syn match rustFloat display " \< [0-9][0-9_]*\. [0-9_]\+\% ([eE][+-]\= [0-9_]\+\)\> "
114
114
syn match rustFloat display " \< [0-9][0-9_]*\. [0-9_]\+\% ([eE][+-]\= [0-9_]\+\)\( f\| f32\| f64\)\> "
115
115
116
+ " For the benefit of delimitMate
117
+ syn region rustLifetimeCandidate display start =/ &'\% (\( [^'\\ ]\|\\\( ['nrt\\\" ]\| x\x\{ 2}\| u\x\{ 4}\| U\x\{ 8}\)\) '\)\@ !/ end =/ [[:cntrl:][:space:][:punct:]]\@ =\| $/ contains =rustLifetime
118
+ syn region rustGenericRegion display start =/ <\% ('\| [^[cntrl:][:space:][:punct:]]\)\@ =')\S\@ =/ end =/ >/ contains =rustGenericLifetimeCandidate
119
+ syn region rustGenericLifetimeCandidate display start =/ \% (<\| ,\s *\)\@ <='/ end =/ [[:cntrl:][:space:][:punct:]]\@ =\| $/ contains =rustLifetime
120
+
116
121
" rustLifetime must appear before rustCharacter, or chars will get the lifetime highlighting
117
122
syn match rustLifetime display " \'\% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *"
118
123
syn match rustCharacter " '\( [^'\\ ]\|\\\( ['nrt\\\" ]\| x\x\{ 2}\| u\x\{ 4}\| U\x\{ 8}\)\) '"
You can’t perform that action at this time.
0 commit comments