Skip to content

syntax: highlight function calls #63

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

Closed
wants to merge 1 commit into from

Conversation

antoinemadec
Copy link
Contributor

First, thanks for the great plugin!

I got inspired by this issue: sheerun/vim-polyglot#283
Changes are minimal, I also updated the doc and README

Thanks,
Antoine

@antoinemadec
Copy link
Contributor Author

@nfnty , could you please take a look at this pull request?
The changes are minimal, thanks in advance 😃

@nfnty nfnty closed this in 53ea235 Feb 25, 2020
@nfnty
Copy link
Member

nfnty commented Feb 25, 2020

Thanks! I refactored it a bit to reduce complexity and to not interfere with other syntax.

@antoinemadec
Copy link
Contributor Author

@nfnty I just updated your plugin and it seems your commit is breaking the highlighting: function definition, function calls and builtin function now have the same color.
before 53ea235:
python_before

after 53ea235:
python_after

mine:
python_mine

Was this intentional?

Thanks,
Antoine

nfnty added a commit that referenced this pull request Feb 26, 2020
@nfnty
Copy link
Member

nfnty commented Feb 26, 2020

Yeah, my bad. Should be fixed now.

@antoinemadec
Copy link
Contributor Author

@nfnty thanks a lot for the quick response. The builtin function highlighting is now fixed.
However, function definition class definition and function calls now all have the same color.
Would it be possible to have:

  • function definition and class definition with one highlighting (the same as before my PR)
  • function call with another highlighting

After f73fbf0:
python_after

Thanks,
Antoine

@nfnty
Copy link
Member

nfnty commented Feb 26, 2020

Yes, just change the highlight link for pythonFunctionCall.

hi link pythonFunctionCall Identifier

Replace Identifier with whatever highlight group you want.

@antoinemadec
Copy link
Contributor Author

@nfnty got it. However, your latest commit also changes the class definition and the function definition highlight as shown on my screenshots. Is this intended?

@nfnty
Copy link
Member

nfnty commented Feb 26, 2020

If you've manually changed the highlight group of pythonFunction before, then it's a side effect of changing the name into pythonFunctionContained. You just have to replace it in your config.

nfnty added a commit that referenced this pull request Feb 26, 2020
@nfnty
Copy link
Member

nfnty commented Feb 26, 2020

Nvm, I changed the naming back to what it was before for backward compatibility. Just update to the latest commit and you'll be good to go.

@antoinemadec
Copy link
Contributor Author

@nfnty , it's working like a charm now 😃
Sorry about all the back and forth and, again, thank you so much for the prompt response and for this great plugin.

Cheers,
Antoine

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.

2 participants