mirror of
https://github.com/amix/vimrc
synced 2025-06-30 11:54:59 +08:00
Updated plugins
This commit is contained in:
@ -117,7 +117,7 @@ if go#config#HighlightFormatStrings()
|
||||
\@<=%[-#0 +]*\
|
||||
\%(\%(\%(\[\d\+\]\)\=\*\)\|\d\+\)\=\
|
||||
\%(\.\%(\%(\%(\[\d\+\]\)\=\*\)\|\d\+\)\=\)\=\
|
||||
\%(\[\d\+\]\)\=[vTtbcdoqxXUeEfFgGsp]/ contained containedin=goString,goRawString
|
||||
\%(\[\d\+\]\)\=[vTtbcdoqxXUeEfFgGspw]/ contained containedin=goString,goRawString
|
||||
hi def link goFormatSpecifier goSpecialString
|
||||
endif
|
||||
|
||||
@ -162,15 +162,21 @@ endif
|
||||
syn match goSingleDecl /\%(import\|var\|const\) [^(]\@=/ contains=goImport,goVar,goConst
|
||||
|
||||
" Integers
|
||||
syn match goDecimalInt "\<-\=\d\+\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goDecimalInt "\<-\=\(0\|[1-9]\d*\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goHexadecimalInt "\<-\=0[xX]\x\+\>"
|
||||
syn match goHexadecimalError "\<-\=0[xX]\x*[^ \t0-9A-Fa-f]\S*\>"
|
||||
syn match goOctalInt "\<-\=0\o\+\>"
|
||||
syn match goOctalError "\<-\=0\o*[89]\d*\>"
|
||||
syn match goOctalError "\<-\=0[XxBb\]]\@!\o*[^ \t0-7]\S*\>"
|
||||
syn match goBinaryInt "\<-\=0[bB][01]\+\>"
|
||||
syn match goBinaryError "\<-\=0[bB][01]*[^ \t01]\S*\>"
|
||||
|
||||
hi def link goDecimalInt Integer
|
||||
hi def link goHexadecimalInt Integer
|
||||
hi def link goHexadecimalError Error
|
||||
hi def link goOctalInt Integer
|
||||
hi def link goOctalError Error
|
||||
hi def link goBinaryInt Integer
|
||||
hi def link goBinaryError Error
|
||||
hi def link Integer Number
|
||||
|
||||
" Floating point
|
||||
@ -382,6 +388,13 @@ hi def link goCoverageNormalText Comment
|
||||
|
||||
function! s:hi()
|
||||
hi def link goSameId Search
|
||||
hi def link goDiagnosticError SpellBad
|
||||
hi def link goDiagnosticWarning SpellRare
|
||||
|
||||
hi def link goDeclsFzfKeyword Keyword
|
||||
hi def link goDeclsFzfFunction Function
|
||||
hi def link goDeclsFzfSpecialComment SpecialComment
|
||||
hi def link goDeclsFzfComment Comment
|
||||
|
||||
" :GoCoverage commands
|
||||
hi def goCoverageCovered ctermfg=green guifg=#A6E22E
|
||||
|
@ -9,17 +9,20 @@ syntax case match
|
||||
|
||||
" match keywords
|
||||
syntax keyword gomodModule module
|
||||
syntax keyword gomodGo go contained
|
||||
syntax keyword gomodRequire require
|
||||
syntax keyword gomodExclude exclude
|
||||
syntax keyword gomodReplace replace
|
||||
|
||||
" require, exclude and replace can be also grouped into block
|
||||
" require, exclude, replace, and go can be also grouped into block
|
||||
syntax region gomodRequire start='require (' end=')' transparent contains=gomodRequire,gomodVersion
|
||||
syntax region gomodExclude start='exclude (' end=')' transparent contains=gomodExclude,gomodVersion
|
||||
syntax region gomodReplace start='replace (' end=')' transparent contains=gomodReplace,gomodVersion
|
||||
syntax match gomodGo '^go .*$' transparent contains=gomodGo,gomodGoVersion
|
||||
|
||||
" set highlights
|
||||
highlight default link gomodModule Keyword
|
||||
highlight default link gomodGo Keyword
|
||||
highlight default link gomodRequire Keyword
|
||||
highlight default link gomodExclude Keyword
|
||||
highlight default link gomodReplace Keyword
|
||||
@ -36,6 +39,10 @@ highlight default link gomodString String
|
||||
syntax match gomodReplaceOperator "\v\=\>"
|
||||
highlight default link gomodReplaceOperator Operator
|
||||
|
||||
" match go versions
|
||||
syntax match gomodGoVersion "1\.\d\+" contained
|
||||
highlight default link gomodGoVersion Identifier
|
||||
|
||||
|
||||
" highlight versions:
|
||||
" * vX.Y.Z-pre
|
||||
|
Reference in New Issue
Block a user