StanAngeloff / php.vim

An up-to-date Vim syntax for PHP (7.x supported)
477 stars 69 forks source link

phpMethodsVar not recognised inside complex syntax #48

Closed msjyoo closed 6 years ago

msjyoo commented 8 years ago
$x = "{$injector->alias()}";

$injector gets highlighted correctly, however everything after that just seems to get generalised as phpIdentifierComplex.

StanAngeloff commented 6 years ago

I'm running locally with the following modifications. As this appears to be a larger change that requires more testing, I've not yet committed it to the repository:

" syn region phpIdentifierComplex  matchgroup=phpParent start="{\$"rs=e-1 end="}"  contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierArray contained extend
" syn region phpIdentifierArray    matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained
syn region phpIdentifierComplex  matchgroup=phpParent start="{\$"rs=e-1 end="}"  contains=phpIdentifier,phpIdentifierSimply,phpSpecialChar,phpMethodsVar,phpStringSingle,phpStringDouble,phpBacktick,phpStrEsc contained extend
StanAngeloff commented 6 years ago

This has been in php.vim for a while now and works great, no complaints.