mirror of
https://github.com/amix/vimrc
synced 2025-09-16 17:15:00 +08:00
Updated plugins
This commit is contained in:
@ -27,6 +27,8 @@
|
||||
" Highlights trailing white space.
|
||||
" - go_highlight_string_spellcheck
|
||||
" Specifies that strings should be spell checked
|
||||
" - go_highlight_format_strings
|
||||
" Highlights printf-style operators inside string literals.
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@ -81,6 +83,10 @@ if !exists("g:go_highlight_string_spellcheck")
|
||||
let g:go_highlight_string_spellcheck = 1
|
||||
endif
|
||||
|
||||
if !exists("g:go_highlight_format_strings")
|
||||
let g:go_highlight_format_strings = 1
|
||||
endif
|
||||
|
||||
if !exists("g:go_highlight_generate_tags")
|
||||
let g:go_highlight_generate_tags = 0
|
||||
endif
|
||||
@ -173,11 +179,14 @@ else
|
||||
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
|
||||
syn region goRawString start=+`+ end=+`+
|
||||
endif
|
||||
syn match goFormatSpecifier /%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)*[vTtbcdoqxXUeEfgGsp]/ contained containedin=goString
|
||||
|
||||
if g:go_highlight_format_strings != 0
|
||||
syn match goFormatSpecifier /%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)*[vTtbcdoqxXUeEfgGsp]/ contained containedin=goString
|
||||
hi def link goFormatSpecifier goSpecialString
|
||||
endif
|
||||
|
||||
hi def link goString String
|
||||
hi def link goRawString String
|
||||
hi def link goFormatSpecifier goSpecialString
|
||||
|
||||
" Characters; their contents
|
||||
syn cluster goCharacterGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU
|
||||
|
18
sources_non_forked/vim-go/syntax/godefstack.vim
Normal file
18
sources_non_forked/vim-go/syntax/godefstack.vim
Normal file
@ -0,0 +1,18 @@
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match godefStackComment '^".*'
|
||||
syn match godefLinePrefix '^[>\s]\s' nextgroup=godefStackEntryNumber contains=godefStackCurrentPosition
|
||||
syn match godefStackEntryNumber '\d\+' nextgroup=godefStackFilename skipwhite
|
||||
syn match godefStackCurrentPosition '>' contained
|
||||
syn match godefStackFilename '[^|]\+' contained nextgroup=godefStackEntryLocation
|
||||
syn region godefStackEntryLocation oneline start='|' end='|' contained contains=godefStackEntryLocationNumber
|
||||
syn match godefStackEntryLocationNumber '\d\+' contained display
|
||||
|
||||
let b:current_syntax = "godefstack"
|
||||
|
||||
hi def link godefStackComment Comment
|
||||
hi def link godefStackCurrentPosition Special
|
||||
hi def link godefStackFilename Directory
|
||||
hi def link godefStackEntryLocationNumber LineNr
|
@ -1,47 +0,0 @@
|
||||
" Copyright 2011 The Go Authors. All rights reserved.
|
||||
" Use of this source code is governed by a BSD-style
|
||||
" license that can be found in the LICENSE file.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
syn match godocTitle "^\([A-Z][A-Z ]*\)$"
|
||||
hi def link godocTitle Title
|
||||
|
||||
" Single Line Definitions
|
||||
syn match godocMethodRec /\i\+\ze)/ contained
|
||||
syn match godocMethodName /) \zs\i\+\ze(/ contained
|
||||
syn match godocMethod /^func \((\i\+ [^)]*)\) \i\+(/ contains=godocMethodRec,godocMethodName
|
||||
syn match godocFunction /^func \zs\i\+\ze(/
|
||||
|
||||
syn match godocType /^type \zs\i\+\ze.*/
|
||||
syn match godocVar /^var \zs\i\+\ze.*/
|
||||
syn match godocConst /^const \zs\i\+\ze.*/
|
||||
|
||||
hi def link godocMethodRec Type
|
||||
hi def link godocType Type
|
||||
hi def link godocMethodName Function
|
||||
hi def link godocFunction Function
|
||||
hi def link godocVar Identifier
|
||||
hi def link godocConst Identifier
|
||||
|
||||
" Definition Blocks
|
||||
syn region godocComment start="/\*" end="\*/" contained
|
||||
syn region godocComment start="//" end="$" contained
|
||||
syn match godocDefinition /^\s\+\i\+/ contained
|
||||
|
||||
syn region godocVarBlock start=/^var (/ end=/^)/ contains=godocComment,godocDefinition
|
||||
syn region godocConstBlock start=/^const (/ end=/^)/ contains=godocComment,godocDefinition
|
||||
syn region godocTypeBlock start=/^type \i\+ \(interface\|struct\) {/ end=/^}/ matchgroup=godocType contains=godocComment,godocType
|
||||
|
||||
hi def link godocComment Comment
|
||||
hi def link godocDefinition Identifier
|
||||
|
||||
syn sync minlines=500
|
||||
|
||||
let b:current_syntax = "godoc"
|
||||
|
||||
" vim:ts=4 sts=2 sw=2:
|
Reference in New Issue
Block a user