Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.

Support "use function" properly. Fixes #42. #45

Merged
merged 1 commit into from
Nov 12, 2015

Conversation

msjyoo
Copy link

@msjyoo msjyoo commented Oct 23, 2015

Works on my machine!

I used regex negative lookbehind, couldn't figure out how to do syntax blacklisting.

@StanAngeloff
Copy link
Owner

Hey,

I've been holding back on merging this as it seems to work, but solves the issue in a less than elegant manner. I'll try to allocate some time to refactor.

@msjyoo
Copy link
Author

msjyoo commented Nov 9, 2015

No problem. It's here for anyone that needs a temporary solution, but feel free to close this.

StanAngeloff added a commit that referenced this pull request Nov 11, 2015
These can be used to customise how class or function names are
highlighted in statements:

    use Class\Name;
    use function function\name;

This follows up on #42 and #45 "Support "use function" properly".
@StanAngeloff
Copy link
Owner

I've added a new branch use-function with numerous additions. These are best described via a screenshot:

hi phpUseClass ctermbg=red
hi phpUseAlias ctermbg=darkgreen
hi phpUseFunction ctermbg=blue

The code above is optional and allows you to customise the new matches. If you leave out this configuration, you should find that the identifier following function is no longer highlighted as phpFunction.

Can you give the use-function branch a spin and let me know if it works for you?

@msjyoo
Copy link
Author

msjyoo commented Nov 12, 2015

Can confirm that it works as expected!

@StanAngeloff StanAngeloff merged commit cc1d95a into StanAngeloff:master Nov 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants