patstockwell/vim-monokai-tasty

Function calls wrong color in Python

bernharl opened this issue ยท 4 comments

Hi. My function calls in Python are green and not light blue (like in SublimeText). I'm using the vim-polyglot package and have enabled let g:python_highlight_all = 1. Is this just because your color scheme doesn't work with that syntax plugin? Everything else looks good.
Screenshot from 2020-07-28 10-01-33

Hi @bernharl. Thanks for taking the time to help improve the colorscheme ๐ŸŽ‰ . I've added a rule to highlight the function call the same way Sublime Text does (light blue). You can see the changes I made in this commit: 6e23360

To get the update, just pull the latest changes using your package manager. If you use Plug the command is :PlugUpdate.

Please let me know if you find any other glaring differences, I don't write that much Python so I'm happy to take suggestions. Thanks again!

Also, for me, using the standard python syntax file in neovim, Python functions are identified by the syntax group as pythonBuiltin. The change I made updated this group to light blue.

For reference, if you want to know which highlight group is being used for a piece of syntax, you can use the following snippet. I keep this in my .vimrc to help me identify named syntax groups.

" If you don't know what the name of a particular hightlight is, you can use
" `What`. It will print out the syntax group that the cursor is currently above.
" from https://www.reddit.com/r/vim/comments/6z4aau/how_to_stop_vim_from_autohighlighting_italics_in/
command! What echo synIDattr(synID(line('.'), col('.'), 1), 'name')

Thanks for the quick reply! It seems that the syntax package I use has different names for function calls. For it to work for me I would need the color to be defined for pythonFunctionCall and pythonBuiltinFunc. Thank you for that command by the way, very useful.

Cool, I checked vim-polyglot and it uses vim-python. I added the plugin and checked the named groups and I got the same names as you suggested. I've added the new rules and pushed the update ๐Ÿ‘.

One of the differences between python syntax highlighting in Sublime vs the vim-monokai-tasty version is the def keyword. Unfortunately, the vim python syntax file lumps the def keyword in the same group as the return keyword. So if def is highlighted as italic light blue, then that makes return italic light blue too. So I've opted to leave them both magenta.

Try it out and lemme know how it goes ๐Ÿ˜„

example comparison:

Screen Shot 2020-07-29 at 7 42 24 pm