Skip to content

Separating function from phpKeyword to phpKeywordFunction #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 170 commits into
base: master
Choose a base branch
from

Conversation

manojo123
Copy link

@manojo123 manojo123 commented Jun 25, 2020

Its possible now to separate function keyword to a standalone syntax highlight using phpKeywordFunction

 544 if php_folding != 1
 545   syn keyword phpKeyword if else elseif while do for foreach switch contained
 546   syn keyword phpKeywordFunction function contained

and

871 syn keyword phpKeywordFunction function contained

and

885 syn cluster phpClConst contains=phpFunctions,phpClasses,phpStaticClasses,phpIdentifier,phpStatement,phpKeyword,phpKeywordFunction,phpOperator,phpSplatOperator,phpStringSingle,phpStringDouble,phpBacktick,php Number,phpType,phpNullValue,phpBoolean,phpStructure,phpMethodsVar,phpConstants,phpException,phpSuperglobals,phpMagicConstants,phpServerVars

StanAngeloff and others added 30 commits November 17, 2011 15:06
Rebuilt on PHP 5.3.6/Ubuntu with most extensions installed from main repo.
Conflicts:

	syntax/php.vim

These were borrowed from paulyg/Vim-PHP-Stuff.
This commit introduces a new template file which will be used when
re-generating the syntax from within PHP.

In addition, several less commonly used extensions are turned off to speed up
loading of the php.vim file on start up.
This commit adds support for:

- New Core constants,
- New language keywords: trait, insteadof,
- New types, e.g., calleable and binary numbers.
> Use MySQL for Syntax Highlighting.
>
> Rather than use the limited SQL syntax, why not use the full MySQL syntax?
This commit does not add support for the new 5.5 keywords or language
constructs.
This commit merges parts of:

aantonello@9d24eab
aantonello@63c93d8

The syntax file is more closely aligned with the generic syntax highlighting
groups in Vim.

This didn't change highlighting for my custom syntax colours, hopefully it
will not affect others as well.
This commit merges parts of:

joshtronic@e9c5d0f

The 'finally' keyword was added to the list of recognised keywords.
$ php -v

PHP 5.5.7-1+sury.org~saucy+1 (cli) (built: Dec 12 2013 21:54:59)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
Problem:  The new Java-like syntax highligting added phpDocComment, et
al.  However phpDocParams highlighted indented html tags in a file with
no doc comments.

Fix: Mark phpDocParams as contained, so phpDocParams must reside in
phpDocComments to receive vim highlights.

Signed-off-by: Justin Charette <[email protected]>
Let the User customise those and pick sensible defaults.

Closes #4.
StanAngeloff and others added 30 commits December 4, 2017 11:39
Closes #31 (and more specifically #31 (comment))

The new highlighting groups are linked to their parents to avoid
breaking existing syntax colouring.
utf8_{encode,decode} were added in manually.

Closes #74.
This follows from #78 which failed to remove the NULL keyword from
`phpType`.
Add 'strip_maximum_size' to remove Vim 7.4 specific syntax.
Use XML syntax highlighting within `<<<XML` and `<<<'XML'`
heredoc/nowdoc strings.
Co-Authored-By: akrabat <[email protected]>
Co-Authored-By: akrabat <[email protected]>
Co-Authored-By: akrabat <[email protected]>
Co-Authored-By: akrabat <[email protected]>
Add support for XML heredoc and nowdoc
This commit also reworks the Dockerfile to pull multiple versions of PHP
and rebuild the syntax against each one.
Because:
- In PHP >= 7.3 Whitespace is allowed before the ending/closing tag of a herdoc/nowdoc
- https://www.php.net/manual/en/migration73.new-features.php#migration73.new-features.core.heredoc
- Currently `php.vim` only catches closing tags without whitespace
before

This commit:
- Changes the end tag delimeter, per @weirdan fix
Allow Whitespace Before Heredoc / Nowdoc Block Endings
Add `g:php_version_id` documentation.
Whoops, trim extra space inside inline code block.
Allow whitespaces after '<<<' operator in Heredoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.