vim-python / python-syntax

Python syntax highlighting for Vim
MIT License
438 stars 84 forks source link

syntax: highlight function calls #63

Closed antoinemadec closed 4 years ago

antoinemadec commented 4 years ago

First, thanks for the great plugin!

I got inspired by this issue: https://github.com/sheerun/vim-polyglot/issues/283 Changes are minimal, I also updated the doc and README

Thanks, Antoine

antoinemadec commented 4 years ago

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

nfnty commented 4 years ago

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

antoinemadec commented 4 years ago

@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 commented 4 years ago

Yeah, my bad. Should be fixed now.

antoinemadec commented 4 years ago

@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:

After f73fbf0ba68054b44384109c4e0fa4a51eecabbf: python_after

Thanks, Antoine

nfnty commented 4 years ago

Yes, just change the highlight link for pythonFunctionCall.

hi link pythonFunctionCall Identifier

Replace Identifier with whatever highlight group you want.

antoinemadec commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

Cheers, Antoine