From fb6f27e86f2ca2fbff88737251d9e26016a62081 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 22 Sep 2021 15:12:06 +0200 Subject: vim-patch:34cc7d8c034f #15753 Update runtime files https://github.com/vim/vim/commit/34cc7d8c034f2bc5b57455577051db8d72e2b87c --- runtime/syntax/go.vim | 6 +- runtime/syntax/gprof.vim | 5 +- runtime/syntax/php.vim | 267 ++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 257 insertions(+), 21 deletions(-) (limited to 'runtime/syntax') diff --git a/runtime/syntax/go.vim b/runtime/syntax/go.vim index 1439487f69..0c326254b8 100644 --- a/runtime/syntax/go.vim +++ b/runtime/syntax/go.vim @@ -5,7 +5,7 @@ " go.vim: Vim syntax file for Go. " Language: Go " Maintainer: Billie Cleek -" Latest Revision: 2021-06-26 +" Latest Revision: 2021-09-18 " License: BSD-style. See LICENSE file in source repository. " Repository: https://github.com/fatih/vim-go @@ -250,7 +250,7 @@ syn match goDecimalError "\<-\=\(_\(\d\+_*\)\+\|\([1-9]\d*_*\)\+__\(\ syn match goHexadecimalInt "\<-\=0[xX]_\?\(\x\+_\?\)\+\>" syn match goHexadecimalError "\<-\=0[xX]_\?\(\x\+_\?\)*\(\([^ \t0-9A-Fa-f_)]\|__\)\S*\|_\)\>" syn match goOctalInt "\<-\=0[oO]\?_\?\(\o\+_\?\)\+\>" -syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>" +syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:;]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>" syn match goBinaryInt "\<-\=0[bB]_\?\([01]\+_\?\)\+\>" syn match goBinaryError "\<-\=0[bB]_\?[01_]*\([^ \t01_)]\S*\|__\S*\|_\)\>" @@ -430,7 +430,7 @@ endif " Build Constraints if s:HighlightBuildConstraints() - syn match goBuildKeyword display contained "+build" + syn match goBuildKeyword display contained "+build\|go:build" " Highlight the known values of GOOS, GOARCH, and other +build options. syn keyword goBuildDirectives contained \ android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 diff --git a/runtime/syntax/gprof.vim b/runtime/syntax/gprof.vim index 880452a84b..d2c5cb4cab 100644 --- a/runtime/syntax/gprof.vim +++ b/runtime/syntax/gprof.vim @@ -1,15 +1,16 @@ " Vim syntax file " Language: Syntax for Gprof Output " Maintainer: Dominique Pelle -" Last Change: 2021 Apr 08 +" Last Change: 2021 Sep 19 " Quit when a syntax file was already loaded if exists("b:current_syntax") - finish + finish endif let s:keepcpo= &cpo set cpo&vim +syn spell notoplevel syn case match syn sync minlines=100 diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim index 7b0085cd6e..80662d6750 100644 --- a/runtime/syntax/php.vim +++ b/runtime/syntax/php.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: php PHP 3/4/5/7/8 " Maintainer: Tyson Andre -" Last Change: Dec 22, 2020 +" Last Change: Sep 18, 2021 " URL: https://github.com/TysonAndre/php-vim-syntax " Former Maintainers: " Jason Woofenden @@ -13,10 +13,32 @@ " than the default colourscheme, because elflord's colours will better " highlight the break-points (Statements) in your code. " +" Note: This embeds a modified copy of the html.vim with (mostly) different symbols, +" in order to implement php_htmlInStrings=2 can work as expected and correctly parse +" ` +" Previous Maintainer Claudio Fleiner +" Repository https://notabug.org/jorgesumle/vim-html-syntax +" Last Change 2021 Mar 02 +" Included patch #7900 to fix comments +" Included patch #7916 to fix a few more things +" " Options: " Set to anything to enable: " php_sql_query SQL syntax highlighting inside strings " php_htmlInStrings HTML syntax highlighting inside strings +" +" By setting this to 2, this will use a local copy of +" HTML syntax highlighting instead of the official +" HTML syntax highlighting, and properly highlight +" `&]" + + " tags + syn region phpInnerHtmlString contained start=+"+ end=+"+ contains=phpInnerHtmlSpecialChar,javaScriptExpression,@phpInnerHtmlPreproc + syn region phpInnerHtmlString contained start=+'+ end=+'+ contains=phpInnerHtmlSpecialChar,javaScriptExpression,@phpInnerHtmlPreproc + syn match phpInnerHtmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@phpInnerHtmlPreproc + syn region phpInnerHtmlEndTag contained start=++ contains=phpInnerHtmlTagN,phpInnerHtmlTagError + syn region phpInnerHtmlTag contained start=+<[^/]+ end=+>+ fold contains=phpInnerHtmlTagN,phpInnerHtmlString,htmlArg,phpInnerHtmlValue,phpInnerHtmlTagError,phpInnerHtmlEvent,phpInnerHtmlCssDefinition,@phpInnerHtmlPreproc,@phpInnerHtmlArgCluster + syn match phpInnerHtmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@phpInnerHtmlTagNameCluster + syn match phpInnerHtmlTagN contained +]<"ms=s+1 + + + " special characters + syn match phpInnerHtmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" + + " Comments (the real ones or the old netscape ones) + if exists("html_wrong_comments") + syn region phpInnerHtmlComment start=+ + " Idem 8.2.4.43,44: Except and are parser errors + " Idem 8.2.4.52: dash-dash-bang (--!>) is error ignored by parser, also closes comment + syn region phpInnerHtmlComment matchgroup=phpInnerHtmlComment start=+ is all right + syn match phpInnerHtmlCommentNested contained "\@!" + syn match phpInnerHtmlCommentError contained "[^>+ keepend + + " server-parsed commands + syn region phpInnerHtmlPreProc start=++ contains=phpInnerHtmlPreStmt,phpInnerHtmlPreError,phpInnerHtmlPreAttr + syn match phpInnerHtmlPreStmt contained "