From e404a658b1647fad396a954776eda0bdabf8353c Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 20 Dec 2016 20:57:20 +0100 Subject: Update --- syntax/blade.vim | 11 +- syntax/c.vim | 53 +- syntax/coffee.vim | 4 +- syntax/cpp.vim | 64 +-- syntax/elixir.vim | 111 +++-- syntax/glsl.vim | 2 +- syntax/go.vim | 19 +- syntax/haskell.vim | 16 +- syntax/html.vim | 60 ++- syntax/jasmine.vim | 7 +- syntax/javascript.vim | 121 +++-- syntax/layout/footer.vim | 25 + syntax/layout/header.vim | 566 +++++++++++++++++++++ syntax/lua.vim | 155 +++--- syntax/modules/accept-language.vim | 8 + syntax/modules/access-key.vim | 11 + syntax/modules/afcgi.vim | 42 ++ syntax/modules/akamai-g2o.vim | 10 + syntax/modules/alacner-lua.vim | 8 + syntax/modules/array-var.vim | 11 + syntax/modules/audio-track-for-hls.vim | 11 + syntax/modules/aws-auth.vim | 13 + syntax/modules/backtrace.vim | 9 + syntax/modules/brotli.vim | 14 + syntax/modules/cache-purge.vim | 9 + syntax/modules/chunkin.vim | 11 + syntax/modules/circle-gif.vim | 11 + syntax/modules/clojure.vim | 39 ++ syntax/modules/consistent-hash.vim | 8 + syntax/modules/devel-kit.vim | 10 + syntax/modules/drizzle.vim | 17 + syntax/modules/dynamic-etags.vim | 8 + syntax/modules/echo.vim | 24 + syntax/modules/encrypted-session.vim | 13 + syntax/modules/enhanced-memcached.vim | 19 + syntax/modules/events.vim | 9 + syntax/modules/ey-balancer.vim | 10 + syntax/modules/fair-balancer.vim | 9 + syntax/modules/fancyindex.vim | 14 + syntax/modules/form-auth.vim | 12 + syntax/modules/form-input.vim | 9 + syntax/modules/geoip.vim | 8 + syntax/modules/gridfs.vim | 8 + syntax/modules/headers-more.vim | 11 + syntax/modules/healthcheck-upstream.vim | 15 + syntax/modules/http-accounting.vim | 12 + syntax/modules/http-auth-digest.vim | 13 + syntax/modules/http-auth-pam.vim | 9 + syntax/modules/http-auth-request.vim | 9 + syntax/modules/http-concat.vim | 13 + syntax/modules/http-dyups.vim | 12 + syntax/modules/http-footer-filter-if.vim | 8 + syntax/modules/http-footer-filter.vim | 9 + syntax/modules/http-internal-redirect.vim | 9 + syntax/modules/http-js.vim | 15 + syntax/modules/http-push.vim | 12 + syntax/modules/http-redis.vim | 14 + syntax/modules/iconv.vim | 10 + syntax/modules/ip-blocker.vim | 8 + syntax/modules/ip2location.vim | 8 + syntax/modules/limit-upload-rate.vim | 9 + syntax/modules/limit-upstream.vim | 10 + syntax/modules/log-if.vim | 8 + syntax/modules/log-request-speed.vim | 9 + syntax/modules/log-zmq.vim | 11 + syntax/modules/lower-upper-case.vim | 9 + syntax/modules/lua-upstream.vim | 7 + syntax/modules/lua.vim | 66 +++ syntax/modules/md5-filter.vim | 8 + syntax/modules/memc.vim | 17 + syntax/modules/mod-security.vim | 11 + syntax/modules/mogilefs.vim | 15 + syntax/modules/mongo.vim | 20 + syntax/modules/mp4-streaming.vim | 8 + syntax/modules/naxsi.vim | 16 + syntax/modules/notice.vim | 9 + syntax/modules/ocsp-proxy.vim | 9 + syntax/modules/openresty-eval.vim | 12 + syntax/modules/openssl-version.vim | 9 + syntax/modules/owner-match.vim | 9 + syntax/modules/pagespeed.vim | 8 + syntax/modules/php-memcache-standard-balancer.vim | 8 + syntax/modules/php-session.vim | 9 + syntax/modules/phusion-passenger.vim | 23 + syntax/modules/postgres.vim | 17 + syntax/modules/pubcookie.vim | 34 ++ syntax/modules/push-stream.vim | 43 ++ syntax/modules/rdns.vim | 10 + syntax/modules/rds-csv.vim | 13 + syntax/modules/rds-json.vim | 11 + syntax/modules/redis2.vim | 17 + syntax/modules/replace-filter.vim | 12 + syntax/modules/roboo.vim | 7 + syntax/modules/rrd-graph.vim | 9 + syntax/modules/rtmp.vim | 108 ++++ syntax/modules/rtmpt-proxy.vim | 12 + syntax/modules/sass.vim | 17 + syntax/modules/secure-download.vim | 11 + syntax/modules/selective-cache-purge.vim | 12 + syntax/modules/set-cconv.vim | 10 + syntax/modules/set-hash.vim | 13 + syntax/modules/set-lang.vim | 15 + syntax/modules/set-misc.vim | 33 ++ syntax/modules/sflow.vim | 8 + syntax/modules/shibboleth.vim | 10 + syntax/modules/slice.vim | 14 + syntax/modules/slowfs.vim | 15 + syntax/modules/small-light.vim | 15 + syntax/modules/sorted-querystring-filter.vim | 8 + syntax/modules/sphinx2.vim | 14 + syntax/modules/spnego-auth.vim | 13 + syntax/modules/srcache.vim | 26 + syntax/modules/sssd-info.vim | 15 + syntax/modules/static-etags.vim | 8 + syntax/modules/statsd.vim | 11 + syntax/modules/sticky.vim | 8 + syntax/modules/stream-echo.vim | 22 + syntax/modules/stream-lua.vim | 12 + syntax/modules/stream-upsync.vim | 11 + syntax/modules/strip.vim | 8 + syntax/modules/subrange.vim | 8 + syntax/modules/substitutions.vim | 9 + syntax/modules/summarizer.vim | 9 + syntax/modules/supervisord.vim | 12 + syntax/modules/tarantool-upstream.vim | 22 + syntax/modules/tcp-proxy.vim | 33 ++ syntax/modules/testcookie.vim | 32 ++ syntax/modules/types-filter.vim | 9 + syntax/modules/unzip.vim | 10 + syntax/modules/upload-progress.vim | 14 + syntax/modules/upload.vim | 20 + syntax/modules/upstream-fair.vim | 9 + syntax/modules/upstream-hash.vim | 9 + syntax/modules/upstream-jdomain.vim | 8 + syntax/modules/upsync.vim | 11 + syntax/modules/url.vim | 10 + syntax/modules/user-agent.vim | 8 + syntax/modules/usptream-ketama-chash.vim | 8 + syntax/modules/video-thumbextractor.vim | 24 + syntax/modules/vkholodkov-eval.vim | 10 + syntax/modules/vts.vim | 20 + syntax/modules/xss.vim | 11 + syntax/modules/zip.vim | 7 + syntax/nginx.vim | 185 ++++--- syntax/pug.vim | 8 +- syntax/puppet.vim | 581 ++++++++++++++++------ syntax/python.vim | 2 +- syntax/rust.vim | 2 + syntax/swift.vim | 4 + syntax/tmux.vim | 1 + 150 files changed, 3356 insertions(+), 468 deletions(-) create mode 100644 syntax/layout/footer.vim create mode 100644 syntax/layout/header.vim create mode 100644 syntax/modules/accept-language.vim create mode 100644 syntax/modules/access-key.vim create mode 100644 syntax/modules/afcgi.vim create mode 100644 syntax/modules/akamai-g2o.vim create mode 100644 syntax/modules/alacner-lua.vim create mode 100644 syntax/modules/array-var.vim create mode 100644 syntax/modules/audio-track-for-hls.vim create mode 100644 syntax/modules/aws-auth.vim create mode 100644 syntax/modules/backtrace.vim create mode 100644 syntax/modules/brotli.vim create mode 100644 syntax/modules/cache-purge.vim create mode 100644 syntax/modules/chunkin.vim create mode 100644 syntax/modules/circle-gif.vim create mode 100644 syntax/modules/clojure.vim create mode 100644 syntax/modules/consistent-hash.vim create mode 100644 syntax/modules/devel-kit.vim create mode 100644 syntax/modules/drizzle.vim create mode 100644 syntax/modules/dynamic-etags.vim create mode 100644 syntax/modules/echo.vim create mode 100644 syntax/modules/encrypted-session.vim create mode 100644 syntax/modules/enhanced-memcached.vim create mode 100644 syntax/modules/events.vim create mode 100644 syntax/modules/ey-balancer.vim create mode 100644 syntax/modules/fair-balancer.vim create mode 100644 syntax/modules/fancyindex.vim create mode 100644 syntax/modules/form-auth.vim create mode 100644 syntax/modules/form-input.vim create mode 100644 syntax/modules/geoip.vim create mode 100644 syntax/modules/gridfs.vim create mode 100644 syntax/modules/headers-more.vim create mode 100644 syntax/modules/healthcheck-upstream.vim create mode 100644 syntax/modules/http-accounting.vim create mode 100644 syntax/modules/http-auth-digest.vim create mode 100644 syntax/modules/http-auth-pam.vim create mode 100644 syntax/modules/http-auth-request.vim create mode 100644 syntax/modules/http-concat.vim create mode 100644 syntax/modules/http-dyups.vim create mode 100644 syntax/modules/http-footer-filter-if.vim create mode 100644 syntax/modules/http-footer-filter.vim create mode 100644 syntax/modules/http-internal-redirect.vim create mode 100644 syntax/modules/http-js.vim create mode 100644 syntax/modules/http-push.vim create mode 100644 syntax/modules/http-redis.vim create mode 100644 syntax/modules/iconv.vim create mode 100644 syntax/modules/ip-blocker.vim create mode 100644 syntax/modules/ip2location.vim create mode 100644 syntax/modules/limit-upload-rate.vim create mode 100644 syntax/modules/limit-upstream.vim create mode 100644 syntax/modules/log-if.vim create mode 100644 syntax/modules/log-request-speed.vim create mode 100644 syntax/modules/log-zmq.vim create mode 100644 syntax/modules/lower-upper-case.vim create mode 100644 syntax/modules/lua-upstream.vim create mode 100644 syntax/modules/lua.vim create mode 100644 syntax/modules/md5-filter.vim create mode 100644 syntax/modules/memc.vim create mode 100644 syntax/modules/mod-security.vim create mode 100644 syntax/modules/mogilefs.vim create mode 100644 syntax/modules/mongo.vim create mode 100644 syntax/modules/mp4-streaming.vim create mode 100644 syntax/modules/naxsi.vim create mode 100644 syntax/modules/notice.vim create mode 100644 syntax/modules/ocsp-proxy.vim create mode 100644 syntax/modules/openresty-eval.vim create mode 100644 syntax/modules/openssl-version.vim create mode 100644 syntax/modules/owner-match.vim create mode 100644 syntax/modules/pagespeed.vim create mode 100644 syntax/modules/php-memcache-standard-balancer.vim create mode 100644 syntax/modules/php-session.vim create mode 100644 syntax/modules/phusion-passenger.vim create mode 100644 syntax/modules/postgres.vim create mode 100644 syntax/modules/pubcookie.vim create mode 100644 syntax/modules/push-stream.vim create mode 100644 syntax/modules/rdns.vim create mode 100644 syntax/modules/rds-csv.vim create mode 100644 syntax/modules/rds-json.vim create mode 100644 syntax/modules/redis2.vim create mode 100644 syntax/modules/replace-filter.vim create mode 100644 syntax/modules/roboo.vim create mode 100644 syntax/modules/rrd-graph.vim create mode 100644 syntax/modules/rtmp.vim create mode 100644 syntax/modules/rtmpt-proxy.vim create mode 100644 syntax/modules/sass.vim create mode 100644 syntax/modules/secure-download.vim create mode 100644 syntax/modules/selective-cache-purge.vim create mode 100644 syntax/modules/set-cconv.vim create mode 100644 syntax/modules/set-hash.vim create mode 100644 syntax/modules/set-lang.vim create mode 100644 syntax/modules/set-misc.vim create mode 100644 syntax/modules/sflow.vim create mode 100644 syntax/modules/shibboleth.vim create mode 100644 syntax/modules/slice.vim create mode 100644 syntax/modules/slowfs.vim create mode 100644 syntax/modules/small-light.vim create mode 100644 syntax/modules/sorted-querystring-filter.vim create mode 100644 syntax/modules/sphinx2.vim create mode 100644 syntax/modules/spnego-auth.vim create mode 100644 syntax/modules/srcache.vim create mode 100644 syntax/modules/sssd-info.vim create mode 100644 syntax/modules/static-etags.vim create mode 100644 syntax/modules/statsd.vim create mode 100644 syntax/modules/sticky.vim create mode 100644 syntax/modules/stream-echo.vim create mode 100644 syntax/modules/stream-lua.vim create mode 100644 syntax/modules/stream-upsync.vim create mode 100644 syntax/modules/strip.vim create mode 100644 syntax/modules/subrange.vim create mode 100644 syntax/modules/substitutions.vim create mode 100644 syntax/modules/summarizer.vim create mode 100644 syntax/modules/supervisord.vim create mode 100644 syntax/modules/tarantool-upstream.vim create mode 100644 syntax/modules/tcp-proxy.vim create mode 100644 syntax/modules/testcookie.vim create mode 100644 syntax/modules/types-filter.vim create mode 100644 syntax/modules/unzip.vim create mode 100644 syntax/modules/upload-progress.vim create mode 100644 syntax/modules/upload.vim create mode 100644 syntax/modules/upstream-fair.vim create mode 100644 syntax/modules/upstream-hash.vim create mode 100644 syntax/modules/upstream-jdomain.vim create mode 100644 syntax/modules/upsync.vim create mode 100644 syntax/modules/url.vim create mode 100644 syntax/modules/user-agent.vim create mode 100644 syntax/modules/usptream-ketama-chash.vim create mode 100644 syntax/modules/video-thumbextractor.vim create mode 100644 syntax/modules/vkholodkov-eval.vim create mode 100644 syntax/modules/vts.vim create mode 100644 syntax/modules/xss.vim create mode 100644 syntax/modules/zip.vim (limited to 'syntax') diff --git a/syntax/blade.vim b/syntax/blade.vim index 42af5145..4c04db75 100644 --- a/syntax/blade.vim +++ b/syntax/blade.vim @@ -31,8 +31,15 @@ syn region bladeEcho matchgroup=bladeDelimiter start="@\@ -" Last Change: 2016 Apr 10 +" Last Change: 2016 Nov 17 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -184,11 +184,6 @@ syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumbe syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" "hex number syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" -if s:ft ==# 'cpp' && !exists("cpp_no_cpp14") - syn match cNumber display contained "\d\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" - syn match cNumber display contained "0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>" - syn match cNumber display contained "0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>" -endif " Flag the first zero of an octal number as something special syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero syn match cOctalZero display contained "\<0" @@ -365,36 +360,36 @@ if !exists("c_no_c99") " ISO C99 endif " Accept %: for # (C99) -syn region cPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError -syn match cPreConditMatch display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" +syn region cPreCondit start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError +syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>" if !exists("c_no_if0") syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip - syn region cCppOutWrapper start="^\s*\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold - syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse + syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold + syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse if !exists("c_no_if0_fold") syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold else syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell endif - syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit - syn region cCppInWrapper start="^\s*\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold - syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit + syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit + syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold + syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit if !exists("c_no_if0_fold") - syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold + syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold else - syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 + syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 endif - syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell - syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip - syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc + syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell + syn region cCppOutSkip contained start="^\s*\zs\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip + syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc endif syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match cIncluded display contained "<[^>]*>" -syn match cInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded +syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded "syn match cLineSkip "\\$" syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock -syn region cDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell -syn region cPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell +syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell +syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell " Highlight User Labels syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString @@ -403,21 +398,21 @@ if s:ft ==# 'c' || exists("cpp_no_cpp11") endif " Avoid matching foo::bar() in C++ by requiring that the next char is not ':' syn cluster cLabelGroup contains=cUserLabel -syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup -syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup +syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup +syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup if s:ft ==# 'cpp' - syn match cUserCont display "^\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup - syn match cUserCont display ";\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup + syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup + syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup else - syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup - syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup + syn match cUserCont display "^\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup + syn match cUserCont display ";\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup endif syn match cUserLabel display "\I\i*" contained " Avoid recognizing most bitfields as labels -syn match cBitField display "^\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType -syn match cBitField display ";\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType +syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType +syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType if exists("c_minlines") let b:c_minlines = c_minlines diff --git a/syntax/coffee.vim b/syntax/coffee.vim index 38839f35..589b8534 100644 --- a/syntax/coffee.vim +++ b/syntax/coffee.vim @@ -34,7 +34,7 @@ hi def link coffeeConditional Conditional syn match coffeeException /\<\%(try\|catch\|finally\)\>/ display hi def link coffeeException Exception -syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\|yield\|debugger\)\>/ +syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\|yield\|debugger\|import\|export\)\>/ \ display " The `own` keyword is only a keyword after `for`. syn match coffeeKeyword /\/ contained containedin=coffeeRepeat @@ -109,7 +109,7 @@ hi def link coffeeFloat Float " An error for reserved keywords, taken from the RESERVED array: " http://coffeescript.org/documentation/docs/lexer.html#section-67 -syn match coffeeReservedError /\<\%(case\|default\|function\|var\|void\|with\|const\|let\|enum\|export\|import\|native\|__hasProp\|__extends\|__slice\|__bind\|__indexOf\|implements\|interface\|package\|private\|protected\|public\|static\)\>/ +syn match coffeeReservedError /\<\%(case\|default\|function\|var\|void\|with\|const\|let\|enum\|native\|implements\|interface\|package\|private\|protected\|public\|static\)\>/ \ display hi def link coffeeReservedError Error diff --git a/syntax/cpp.vim b/syntax/cpp.vim index 8406070d..ff0c7ec2 100644 --- a/syntax/cpp.vim +++ b/syntax/cpp.vim @@ -4,23 +4,16 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c/c++') == -1 " Language: C++ " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) " Previous Maintainer: Ken Shan -" Last Change: 2015 Nov 10 +" Last Change: 2016 Oct 28 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C syntax to start with -if version < 600 - so :p:h/c.vim -else - runtime! syntax/c.vim - unlet b:current_syntax -endif +runtime! syntax/c.vim +unlet b:current_syntax " C++ extensions syn keyword cppStatement new delete this friend using @@ -39,8 +32,8 @@ syn keyword cppConstant __cplusplus " C++ 11 extensions if !exists("cpp_no_cpp11") - syn keyword cppModifier override final auto - syn keyword cppType nullptr_t + syn keyword cppModifier override final + syn keyword cppType nullptr_t auto syn keyword cppExceptions noexcept syn keyword cppStorageClass constexpr decltype thread_local syn keyword cppConstant nullptr @@ -55,36 +48,31 @@ endif " C++ 14 extensions if !exists("cpp_no_cpp14") - syn match cppNumber display "\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>" + syn case ignore + syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>" + syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" + syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>" + syn case match endif " The minimum and maximum operators in GNU C++ syn match cppMinMax "[<>]?" " Default highlighting -if version >= 508 || !exists("did_cpp_syntax_inits") - if version < 508 - let did_cpp_syntax_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - HiLink cppAccess cppStatement - HiLink cppCast cppStatement - HiLink cppExceptions Exception - HiLink cppOperator Operator - HiLink cppStatement Statement - HiLink cppModifier Type - HiLink cppType Type - HiLink cppStorageClass StorageClass - HiLink cppStructure Structure - HiLink cppBoolean Boolean - HiLink cppConstant Constant - HiLink cppRawStringDelimiter Delimiter - HiLink cppRawString String - HiLink cppNumber Number - delcommand HiLink -endif +hi def link cppAccess cppStatement +hi def link cppCast cppStatement +hi def link cppExceptions Exception +hi def link cppOperator Operator +hi def link cppStatement Statement +hi def link cppModifier Type +hi def link cppType Type +hi def link cppStorageClass StorageClass +hi def link cppStructure Structure +hi def link cppBoolean Boolean +hi def link cppConstant Constant +hi def link cppRawStringDelimiter Delimiter +hi def link cppRawString String +hi def link cppNumber Number let b:current_syntax = "cpp" diff --git a/syntax/elixir.vim b/syntax/elixir.vim index 12223577..cd24cba6 100644 --- a/syntax/elixir.vim +++ b/syntax/elixir.vim @@ -10,25 +10,23 @@ set cpo&vim " syncing starts 2000 lines before top line so docstrings don't screw things up syn sync minlines=2000 -syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments,elixirBlockDefinition +syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments,elixirBlockDefinition,elixirUnusedVariable syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass syn cluster elixirDeclaration contains=elixirFunctionDeclaration,elixirModuleDeclaration,elixirProtocolDeclaration,elixirImplDeclaration,elixirRecordDeclaration,elixirMacroDeclaration,elixirDelegateDeclaration,elixirOverridableDeclaration,elixirExceptionDeclaration,elixirCallbackDeclaration,elixirStructDeclaration -syn match elixirComment '^\s*#.*' contains=elixirTodo,@Spell +syn match elixirComment '#.*' contains=elixirTodo,@Spell syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained -syn keyword elixirKeyword case when with cond for if unless try receive send -syn keyword elixirKeyword do end exit raise throw after rescue catch else -syn keyword elixirKeyword quote unquote super spawn spawn_link spawn_monitor +syn match elixirId '\<[_a-zA-Z]\w*[!?]\?\>' + +syn match elixirKeyword '\(\.\)\@' +syn match elixirKeyword '\(\.\)\@' +syn match elixirKeyword '\(\.\)\@' -" Functions used on guards -syn keyword elixirKeyword contained is_atom is_binary is_bitstring is_boolean -syn keyword elixirKeyword contained is_float is_function is_integer is_list -syn keyword elixirKeyword contained is_map is_nil is_number is_pid is_port -syn keyword elixirKeyword contained is_record is_reference is_tuple is_exception -syn keyword elixirKeyword contained abs bit_size byte_size div elem hd length -syn keyword elixirKeyword contained map_size node rem round tl trunc tuple_size +" Kernel functions +syn match elixirKernelFunction contained containedin=elixirGuard '\<\(is_atom\|is_binary\|is_bitstring\|is_boolean\|is_float\|is_function\|is_integer\|is_list\|is_map\|is_nil\|is_number\|is_pid\|is_port\)\>\([ (]\)\@=' +syn match elixirKernelFunction contained containedin=elixirGuard '\<\(is_record\|is_reference\|is_tuple\|is_exception\|abs\|bit_size\|byte_size\|div\|elem\|hd\|length\|map_size\|node\|rem\|round\|tl\|trunc\|tuple_size\)\>\([ (]\)\@=' syn match elixirGuard '.*when.*' contains=ALLBUT,@elixirNotTop @@ -36,12 +34,10 @@ syn keyword elixirInclude import require alias use syn keyword elixirSelf self -syn match elixirId '\<[_a-zA-Z]\w*[!?]\?\>' - " This unfortunately also matches function names in function calls -syn match elixirUnusedVariable '\(([^)]*\)\@<=\<_\w*\>' +syn match elixirUnusedVariable contained '\<_\w*\>' -syn keyword elixirOperator and not or when xor in +syn keyword elixirOperator and not or in syn match elixirOperator '!==\|!=\|!' syn match elixirOperator '=\~\|===\|==\|=' syn match elixirOperator '<<<\|<<\|<=\|<-\|<' @@ -58,6 +54,8 @@ syn match elixirAtom '\(:\)\@=]\@!\)\?\|<>\|===\ syn match elixirAtom '\(:\)\@\|&&\?\|%\(()\|\[\]\|{}\)\|++\?\|--\?\|||\?\|!\|//\|[%&`/|]\)' syn match elixirAtom "\%([a-zA-Z_]\w*[?!]\?\):\(:\)\@!" +syn match elixirBlockInline "\<\(do\|else\)\>:\@=" + syn match elixirAlias '\<[!]\?[A-Z]\w*\(\.[A-Z]\w*\)*\>' syn keyword elixirBoolean true false nil @@ -79,20 +77,18 @@ syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\| syn region elixirRegex matchgroup=elixirRegexDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial -syn region elixirString matchgroup=elixirStringDelimiter start=+\z('\)+ end=+\z1+ skip=+\\\\+ contains=@elixirStringContained -syn region elixirString matchgroup=elixirStringDelimiter start=+\z("\)+ end=+\z1+ skip=+\\\\+ contains=@elixirStringContained +syn region elixirString matchgroup=elixirStringDelimiter start=+\z('\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@elixirStringContained +syn region elixirString matchgroup=elixirStringDelimiter start=+\z("\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@elixirStringContained syn region elixirString matchgroup=elixirStringDelimiter start=+\z('''\)+ end=+^\s*\z1+ skip=+'\|\\\\+ contains=@elixirStringContained syn region elixirString matchgroup=elixirStringDelimiter start=+\z("""\)+ end=+^\s*\z1+ skip=+"\|\\\\+ contains=@elixirStringContained -syn region elixirInterpolation matchgroup=elixirInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment,@elixirNotTop - -syn match elixirDocString +\(@\w*doc\s*\)\@<=\%("""\_.\{-}\_^\s*"""\|".\{-\}"\)+ contains=elixirTodo,elixirInterpolation,@Spell fold +syn region elixirInterpolation matchgroup=elixirInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,elixirKernelFunction,elixirComment,@elixirNotTop syn match elixirAtomInterpolated ':\("\)\@=' contains=elixirString syn match elixirString "\(\w\)\@\|0[0-7]{0,2}[0-7]\@!\>\|[^x0MC]\)\|(\\[MC]-)+\w\|[^\s\\]\)" -syn region elixirBlock matchgroup=elixirBlockDefinition start="\:\@!" end="\" contains=ALLBUT,@elixirNotTop fold -syn region elixirElseBlock matchgroup=elixirBlockDefinition start="\:\@!" end="\" contains=ALLBUT,@elixirNotTop fold -syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\" end="\" contains=ALLBUT,@elixirNotTop fold +syn region elixirBlock matchgroup=elixirBlockDefinition start="\:\@!" end="\" contains=ALLBUT,elixirKernelFunction,@elixirNotTop fold +syn region elixirElseBlock matchgroup=elixirBlockDefinition start="\:\@!" end="\" contains=ALLBUT,elixirKernelFunction,@elixirNotTop fold +syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\" end="\" contains=ALLBUT,elixirKernelFunction,@elixirNotTop fold syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigilDelimiter @@ -109,26 +105,49 @@ syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l{" syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l<" end=">" skip="\\\\\|\\>" contains=@elixirStringContained,elixirRegexEscapePunctuation fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\[" end="\]" skip="\\\\\|\\\]" contains=@elixirStringContained,elixirRegexEscapePunctuation fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l(" end=")" skip="\\\\\|\\)" contains=@elixirStringContained,elixirRegexEscapePunctuation fold +syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\/" end="\/" skip="\\\\\|\\\/" contains=@elixirStringContained,elixirRegexEscapePunctuation fold + +" Sigils surrounded with heredoc +syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z("""\)+ end=+^\s*\zs\z1\s*$+ skip=+\\"+ fold +syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z('''\)+ end=+^\s*\zs\z1\s*$+ skip=+\\'+ fold + +" Documentation +if exists('g:elixir_use_markdown_for_docs') && g:elixir_use_markdown_for_docs + syn include @markdown syntax/markdown.vim + syn cluster elixirDocStringContained contains=@markdown,@Spell +else + let g:elixir_use_markdown_for_docs = 0 + syn cluster elixirDocStringContained contains=elixirDocTest,elixirTodo,@Spell + + " doctests + syn region elixirDocTest start="^\s*\%(iex\|\.\.\.\)\%((\d*)\)\?>\s" end="^\s*$" contained +endif -" Sigils surrounded with docString -syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z("""\)+ end=+^\s*\zs\z1+ skip=+\\"+ fold -syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z('''\)+ end=+^\s*\zs\z1+ skip=+\\'+ fold +syn region elixirDocString matchgroup=elixirSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss]\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" contains=@elixirDocStringContained fold keepend +syn region elixirDocString matchgroup=elixirSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss]{" end="}" skip="\\\\\|\\}" contains=@elixirDocStringContained fold keepend +syn region elixirDocString matchgroup=elixirSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss]<" end=">" skip="\\\\\|\\>" contains=@elixirDocStringContained fold keepend +syn region elixirDocString matchgroup=elixirSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss]\[" end="\]" skip="\\\\\|\\\]" contains=@elixirDocStringContained fold keepend +syn region elixirDocString matchgroup=elixirSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss](" end=")" skip="\\\\\|\\)" contains=@elixirDocStringContained fold keepend +syn region elixirDocString matchgroup=elixirStringDelimiter start=+\%(@\w*doc\s\+\)\@<=\z("\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@elixirDocStringContained keepend +syn region elixirDocString matchgroup=elixirStringDelimiter start=+\%(@\w*doc\s\+\)\@<=\z("""\)+ end=+\z1+ contains=@elixirDocStringContained fold keepend +syn region elixirDocString matchgroup=elixirSigilDelimiter start=+\%(@\w*doc\s\+\)\@<=\~[Ss]\z('''\)+ end=+\z1+ skip=+\\'+ contains=@elixirDocStringContained fold keepend +syn region elixirDocString matchgroup=elixirSigilDelimiter start=+\%(@\w*doc\s\+\)\@<=\~[Ss]\z("""\)+ end=+\z1+ skip=+\\"+ contains=@elixirDocStringContained fold keepend " Defines -syn keyword elixirDefine def nextgroup=elixirFunctionDeclaration skipwhite skipnl -syn keyword elixirPrivateDefine defp nextgroup=elixirFunctionDeclaration skipwhite skipnl -syn keyword elixirModuleDefine defmodule nextgroup=elixirModuleDeclaration skipwhite skipnl -syn keyword elixirProtocolDefine defprotocol nextgroup=elixirProtocolDeclaration skipwhite skipnl -syn keyword elixirImplDefine defimpl nextgroup=elixirImplDeclaration skipwhite skipnl -syn keyword elixirRecordDefine defrecord nextgroup=elixirRecordDeclaration skipwhite skipnl -syn keyword elixirPrivateRecordDefine defrecordp nextgroup=elixirRecordDeclaration skipwhite skipnl -syn keyword elixirMacroDefine defmacro nextgroup=elixirMacroDeclaration skipwhite skipnl -syn keyword elixirPrivateMacroDefine defmacrop nextgroup=elixirMacroDeclaration skipwhite skipnl -syn keyword elixirDelegateDefine defdelegate nextgroup=elixirDelegateDeclaration skipwhite skipnl -syn keyword elixirOverridableDefine defoverridable nextgroup=elixirOverridableDeclaration skipwhite skipnl -syn keyword elixirExceptionDefine defexception nextgroup=elixirExceptionDeclaration skipwhite skipnl -syn keyword elixirCallbackDefine defcallback nextgroup=elixirCallbackDeclaration skipwhite skipnl -syn keyword elixirStructDefine defstruct skipwhite skipnl +syn match elixirDefine '\\(:\)\@!' nextgroup=elixirFunctionDeclaration skipwhite skipnl +syn match elixirPrivateDefine '\\(:\)\@!' nextgroup=elixirFunctionDeclaration skipwhite skipnl +syn match elixirModuleDefine '\\(:\)\@!' nextgroup=elixirModuleDeclaration skipwhite skipnl +syn match elixirProtocolDefine '\\(:\)\@!' nextgroup=elixirProtocolDeclaration skipwhite skipnl +syn match elixirImplDefine '\\(:\)\@!' nextgroup=elixirImplDeclaration skipwhite skipnl +syn match elixirRecordDefine '\\(:\)\@!' nextgroup=elixirRecordDeclaration skipwhite skipnl +syn match elixirPrivateRecordDefine '\\(:\)\@!' nextgroup=elixirRecordDeclaration skipwhite skipnl +syn match elixirMacroDefine '\\(:\)\@!' nextgroup=elixirMacroDeclaration skipwhite skipnl +syn match elixirPrivateMacroDefine '\\(:\)\@!' nextgroup=elixirMacroDeclaration skipwhite skipnl +syn match elixirDelegateDefine '\\(:\)\@!' nextgroup=elixirDelegateDeclaration skipwhite skipnl +syn match elixirOverridableDefine '\\(:\)\@!' nextgroup=elixirOverridableDeclaration skipwhite skipnl +syn match elixirExceptionDefine '\\(:\)\@!' nextgroup=elixirExceptionDeclaration skipwhite skipnl +syn match elixirCallbackDefine '\\(:\)\@!' nextgroup=elixirCallbackDeclaration skipwhite skipnl +syn match elixirStructDefine '\\(:\)\@!' skipwhite skipnl " Declarations syn match elixirModuleDeclaration "[^[:space:];#<]\+" contained nextgroup=elixirBlock skipwhite skipnl @@ -143,6 +162,12 @@ syn match elixirOverridableDeclaration "[^[:space:];#<]\+" contained con syn match elixirExceptionDeclaration "[^[:space:];#<]\+" contained contains=elixirAlias skipwhite skipnl syn match elixirCallbackDeclaration "[^[:space:];#<,()\[\]]\+" contained contains=elixirFunctionDeclaration skipwhite skipnl +" ExUnit +syn match elixirExUnitMacro "\(^\s*\)\@<=\<\(test\|describe\|setup\|setup_all\|on_exit\|doctest\)\>" +syn match elixirExUnitAssert "\(^\s*\)\@<=\<\(assert\|assert_in_delta\|assert_raise\|assert_receive\|assert_received\|catch_error\)\>" +syn match elixirExUnitAssert "\(^\s*\)\@<=\<\(catch_exit\|catch_throw\|flunk\|refute\|refute_in_delta\|refute_receive\|refute_received\)\>" + +hi def link elixirBlockInline Keyword hi def link elixirBlockDefinition Keyword hi def link elixirDefine Define hi def link elixirPrivateDefine Define @@ -158,6 +183,7 @@ hi def link elixirOverridableDefine Define hi def link elixirExceptionDefine Define hi def link elixirCallbackDefine Define hi def link elixirStructDefine Define +hi def link elixirExUnitMacro Define hi def link elixirModuleDeclaration Type hi def link elixirFunctionDeclaration Function hi def link elixirMacroDeclaration Macro @@ -165,6 +191,8 @@ hi def link elixirInclude Include hi def link elixirComment Comment hi def link elixirTodo Todo hi def link elixirKeyword Keyword +hi def link elixirExUnitAssert Keyword +hi def link elixirKernelFunction Keyword hi def link elixirOperator Operator hi def link elixirAtom Constant hi def link elixirPseudoVariable Constant @@ -175,6 +203,7 @@ hi def link elixirSelf Identifier hi def link elixirUnusedVariable Comment hi def link elixirNumber Number hi def link elixirDocString Comment +hi def link elixirDocTest elixirKeyword hi def link elixirAtomInterpolated elixirAtom hi def link elixirRegex elixirString hi def link elixirRegexEscape elixirSpecial diff --git a/syntax/glsl.vim b/syntax/glsl.vim index 147c42e7..f0424b50 100644 --- a/syntax/glsl.vim +++ b/syntax/glsl.vim @@ -8,7 +8,7 @@ if exists("b:current_syntax") && b:current_syntax == "glsl" endif " Statements -syn keyword glslConditional if else +syn keyword glslConditional if else switch case default syn keyword glslRepeat for while do syn keyword glslStatement discard return break continue diff --git a/syntax/go.vim b/syntax/go.vim index 203be1f2..0beaf545 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -129,12 +129,12 @@ hi def link goComplexes Type " Predefined functions and values syn match goBuiltins /\<\v(append|cap|close|complex|copy|delete|imag|len)\ze\(/ syn match goBuiltins /\<\v(make|new|panic|print|println|real|recover)\ze\(/ -syn keyword goPredefinedIdentifiers nil iota syn keyword goBoolean true false +syn keyword goPredefinedIdentifiers nil iota hi def link goBuiltins Keyword -hi def link goPredefinedIdentifiers Identifier hi def link goBoolean Boolean +hi def link goPredefinedIdentifiers goBoolean " Comments; their contents syn keyword goTodo contained TODO FIXME XXX BUG @@ -304,16 +304,18 @@ if g:go_highlight_functions != 0 syn match goPointerOperator /\*/ nextgroup=goReceiverType contained skipwhite skipnl syn match goReceiverType /\w\+/ contained syn match goFunction /\w\+/ contained + syn match goFunctionCall /\w\+\ze(/ contains=GoBuiltins,goDeclaration else syn keyword goDeclaration func endif hi def link goFunction Function +hi def link goFunctionCall Type " Methods; if g:go_highlight_methods != 0 - syn match goMethod /\.\w\+\ze(/hs=s+1 + syn match goMethodCall /\.\w\+\ze(/hs=s+1 endif -hi def link goMethod Type +hi def link goMethodCall Type " Fields; if g:go_highlight_fields != 0 @@ -326,7 +328,7 @@ if g:go_highlight_types != 0 syn match goTypeConstructor /\<\w\+{/he=e-1 syn match goTypeDecl /\/ nextgroup=goTypeName skipwhite skipnl syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl - syn match goDeclType /\/ contained skipwhite skipnl + syn match goDeclType /\/ skipwhite skipnl hi def link goReceiverType Type else syn keyword goDeclType struct interface @@ -374,12 +376,7 @@ endif hi def link goCoverageNormalText Comment function! s:hi() - " :GoSameIds - if &background == 'dark' - hi def goSameId term=bold cterm=bold ctermbg=white ctermfg=black guibg=white guifg=black - else - hi def goSameId term=bold cterm=bold ctermbg=14 guibg=Cyan - endif + hi def link goSameId Search " :GoCoverage commands hi def goCoverageCovered ctermfg=green guifg=#A6E22E diff --git a/syntax/haskell.vim b/syntax/haskell.vim index b35c0225..1f0f905a 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -13,6 +13,10 @@ elseif exists("b:current_syntax") finish endif +if !exists('g:haskell_disable_TH') + let g:haskell_disable_TH = 0 +endif + syn spell notoplevel syn match haskellRecordField contained containedin=haskellBlock \ "[_a-z][a-zA-Z0-9_']*\(,\s*[_a-z][a-zA-Z0-9_']*\)*\(\s*::\|\n\s\+::\)" @@ -82,7 +86,7 @@ syn match haskellLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" \ contains= \ haskellTodo, \ @Spell -syn match haskellBacktick "`[A-Za-z_][A-Za-z0-9_\.']*`" +syn match haskellBacktick "`[A-Za-z_][A-Za-z0-9_\.']*#\?`" syn region haskellString start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=@Spell syn match haskellIdentifier "[_a-z][a-zA-z0-9_']*" contained @@ -94,14 +98,16 @@ syn region haskellBlockComment start="{-" end="-}" \ haskellTodo, \ @Spell syn region haskellPragma start="{-#" end="#-}" -syn match haskellQuasiQuoted "." containedin=haskellQuasiQuote contained -syn region haskellQuasiQuote matchgroup=haskellTH start="\[[_a-zA-Z][a-zA-z0-9._']*|" end="|\]" -syn region haskellTHBlock matchgroup=haskellTH start="\[\(d\|t\|p\)\?|" end="|]" contains=TOP -syn region haskellTHDoubleBlock matchgroup=haskellTH start="\[||" end="||]" contains=TOP syn match haskellPreProc "^#.*$" syn keyword haskellTodo TODO FIXME contained " Treat a shebang line at the start of the file as a comment syn match haskellShebang "\%^#!.*$" +if exists('g:haskell_disable_TH') && g:haskell_disable_TH == 0 + syn match haskellQuasiQuoted "." containedin=haskellQuasiQuote contained + syn region haskellQuasiQuote matchgroup=haskellTH start="\[[_a-zA-Z][a-zA-z0-9._']*|" end="|\]" + syn region haskellTHBlock matchgroup=haskellTH start="\[\(d\|t\|p\)\?|" end="|]" contains=TOP + syn region haskellTHDoubleBlock matchgroup=haskellTH start="\[||" end="||]" contains=TOP +endif if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1 syn keyword haskellTypeRoles phantom representational nominal contained syn region haskellTypeRoleBlock matchgroup=haskellTypeRoles start="type\s\+role" end="$" keepend diff --git a/syntax/html.vim b/syntax/html.vim index 77dc0fce..0c03fa22 100644 --- a/syntax/html.vim +++ b/syntax/html.vim @@ -44,6 +44,29 @@ syn keyword htmlTagName contained missing-glyph mpath syn keyword htmlTagName contained text textPath tref tspan vkern syn keyword htmlTagName contained metadata title +" MathML tags +" https://www.w3.org/TR/MathML3/appendixi.html#index.elem +syn keyword htmlTagName contained abs and annotation annotation-xml apply approx arccos arccosh arccot arccoth +syn keyword htmlTagName contained arccsc arccsch arcsec arcsech arcsin arcsinh arctan arctanh arg bind +syn keyword htmlTagName contained bvar card cartesianproduct cbytes ceiling cerror ci cn codomain complexes +syn keyword htmlTagName contained compose condition conjugate cos cosh cot coth cs csc csch +syn keyword htmlTagName contained csymbol curl declare degree determinant diff divergence divide domain domainofapplication +syn keyword htmlTagName contained emptyset eq equivalent eulergamma exists exp exponentiale factorial factorof false +syn keyword htmlTagName contained floor fn forall gcd geq grad gt ident image imaginary +syn keyword htmlTagName contained imaginaryi implies in infinity int integers intersect interval inverse lambda +syn keyword htmlTagName contained laplacian lcm leq limit list ln log logbase lowlimit lt +syn keyword htmlTagName contained maction maligngroup malignmark math matrix matrixrow max mean median menclose +syn keyword htmlTagName contained merror mfenced mfrac mglyph mi mi" min minus mlabeledtr mlongdiv +syn keyword htmlTagName contained mmultiscripts mn mo mode moment momentabout mover mpadded mphantom mprescripts +syn keyword htmlTagName contained mroot mrow ms mscarries mscarry msgroup msline mspace msqrt msrow +syn keyword htmlTagName contained mstack mstyle msub msubsup msup mtable mtd mtext mtr munder +syn keyword htmlTagName contained munderover naturalnumbers neq none not notanumber notin notprsubset notsubset or +syn keyword htmlTagName contained otherwise outerproduct partialdiff pi piece piecewise plus power primes product +syn keyword htmlTagName contained prsubset quotient rationals real reals reln rem root scalarproduct sdev +syn keyword htmlTagName contained sec sech selector semantics sep set setdiff share sin sinh +syn keyword htmlTagName contained span subset sum tan tanh tendsto times transpose true union +syn keyword htmlTagName contained uplimit variance vector vectorproduct xor + " Custom Element syn match htmlTagName contained "\<[a-z_]\([a-z0-9_.]\+\)\?\(\-[a-z0-9_.]\+\)\+\>" @@ -79,13 +102,26 @@ syn keyword htmlArg contained async " syn keyword htmlArg contained select "