vim-python / python-syntax

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

let g:python_highlight_builtins=1 colours wrongly #66

Closed snejus closed 4 years ago

snejus commented 4 years ago

Version: most recent commit, https://github.com/vim-python/python-syntax/commit/6ce77d0013690b8b44a8d088ba4b54ba549ae98e .

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.