-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
Improve php highlighting #218
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @pirey 👋, thanks for your contribution 👍
That's a great improvement! For some reasons highlighting of functions/methods and structs/classes seem to be tricky when it comes to create regular expressions for Vim's parsing engine. I guess these groups must have been added after I've added the PHP groups since it bothered me that I could not match the style for some languages to the ones of other ports (like e.g. JetBrains IDEs or VS Code) due to this limitation.
Support for plugins are always welcome, but we should check which plugin comes with a good set of features and is maintained actively to ensure we don't have to maintain multiple ones.
Your changes make it able to easily differ classes and functions/methods from variables and syntactic characters like braces.
Will be shipped with the next minor release 🚢
This is a follow up for #218 [1] which added highlighting groups for the bundled PHP syntax, but the groups are actually defined by the StanAngeloff/php.vim [2] plugin. Therefore the added highlighting calls will be moved to a plugin section. Additionally, the `phpClassExtends` and `phpClassImplements` groups have been added to improve the highlighting for classes that implement or extended interfaces/classes. The `phpUseClass` has also been added to improve the highlighting for imports. [1]: #218 [2]: https://github.com/StanAngeloff/php.vim Related to GH-218 GH-262 Co-authored-by: Sven Greb <development@svengreb.de>
This is a follow up for #218 [1] which added highlighting groups for the bundled PHP syntax, but the groups are actually defined by the StanAngeloff/php.vim [2] plugin. Therefore the added highlighting calls will be moved to a plugin section. Additionally, the `phpClassExtends` and `phpClassImplements` groups have been added to improve the highlighting for classes that implement or extended interfaces/classes. The `phpUseClass` has also been added to improve the highlighting for imports. [1]: #218 [2]: https://github.com/StanAngeloff/php.vim Related to GH-218 Closes GH-262 Co-authored-by: Sven Greb <development@svengreb.de>
This is a follow up for nordtheme#218 [1] which added highlighting groups for the bundled PHP syntax, but the groups are actually defined by the StanAngeloff/php.vim [2] plugin. Therefore the added highlighting calls will be moved to a plugin section. Additionally, the `phpClassExtends` and `phpClassImplements` groups have been added to improve the highlighting for classes that implement or extended interfaces/classes. The `phpUseClass` has also been added to improve the highlighting for imports. [1]: nordtheme#218 [2]: https://github.com/StanAngeloff/php.vim Related to nordthemeGH-218 Closes nordthemeGH-262 Co-authored-by: Sven Greb <development@svengreb.de>
I added highlight for some groups in php, to better match highlighting in vscode, because I think highlight in vscode is nice.
Here's the comparison before (left = neovim, right = vscode):
Here's the comparison after:
Still cannot highlight some element, e.g trait
use
,$this
keyword, because missing highlight group for those, probably need additional syntax definition plugin for php?