vim-python/python-syntax

let g:python_highlight_builtins=1 colours wrongly

snejus opened this issue · 0 comments

Version: most recent commit, 6ce77d0 .

Problem: Setting let g:python_highlight_builtins=1 does not result in the expected syntax colouring for built-in functions, classes or types.

I selectively choose which options I want to have due to rendering limitations of gnome-vim, please see the options defined in my .vimrc (take note of the options that are commented):

let g:python_highlight_builtins = 1
let g:python_highlight_exceptions = 1
let g:python_highlight_func_calls = 1
let g:python_highlight_class_vars = 1
" let g:python_highlight_string_formatting = 1
" let g:python_highlight_string_format = 1
" let g:python_highlight_string_templates = 1
" let g:python_highlight_indent_errors = 1
" let g:python_highlight_space_errors = 1
" let g:python_highlight_doctests = 1
" let g:python_highlight_operators = 1

This is what I get - built-in types and functions take the same colour as normal functions, whereas built-in types are not coloured.
image

I had a look at the source and found the culprit. Currently working on a PR.