mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
Updated plugins and added vim-jade
This commit is contained in:
@ -208,9 +208,17 @@ endif
|
||||
" Spacing errors around the 'chan' keyword
|
||||
if g:go_highlight_chan_whitespace_error != 0
|
||||
" receive-only annotation on chan type
|
||||
syn match goSpaceError display "\(<-\)\@<=\s\+\(chan\>\)\@="
|
||||
"
|
||||
" \(\<chan\>\)\@<!<- (only pick arrow when it doesn't come after a chan)
|
||||
" this prevents picking up 'chan<- chan<-' but not '<- chan'
|
||||
syn match goSpaceError display "\(\(\<chan\>\)\@<!<-\)\@<=\s\+\(\<chan\>\)\@="
|
||||
|
||||
" send-only annotation on chan type
|
||||
syn match goSpaceError display "\(\<chan\)\@<=\s\+\(<-\)\@="
|
||||
"
|
||||
" \(<-\)\@<!\<chan\> (only pick chan when it doesn't come after an arrow)
|
||||
" this prevents picking up '<-chan <-chan' but not 'chan <-'
|
||||
syn match goSpaceError display "\(\(<-\)\@<!\<chan\>\)\@<=\s\+\(<-\)\@="
|
||||
|
||||
" value-ignoring receives in a few contexts
|
||||
syn match goSpaceError display "\(\(^\|[={(,;]\)\s*<-\)\@<=\s\+"
|
||||
endif
|
||||
|
Reference in New Issue
Block a user