Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ let g:python_highlight_all = 1
| --------------------------------------------- | -------------------------------------------------------------- | ------- |
| `g:python_version_2` | Python 2 mode | `0` |
| `b:python_version_2` | Python 2 mode (buffer local) | `0` |
| `g:python_highlight_builtins` | Highlight builtin functions and objects | `0` |
| `g:python_highlight_builtins` | Highlight builtin functions, types and objects | `0` |
| `g:python_highlight_builtin_objs` | Highlight builtin objects only | `0` |
| `g:python_highlight_builtin_types` | Highlight builtin types only | `0` |
| `g:python_highlight_builtin_funcs` | Highlight builtin functions only | `0` |
Expand Down
2 changes: 1 addition & 1 deletion doc/python-syntax.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ following command to your `~/.config/nvim/init.vim` or `~/.vimrc`: >
Python 2 mode (buffer local)

`g:python_highlight_builtins` (default `0`)
Highlight builtin functions and objects
Highlight builtin functions, types and objects

`g:python_highlight_builtin_objs` (default `0`)
Highlight builtin objects only
Expand Down
15 changes: 9 additions & 6 deletions syntax/python.vim
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ endfunction
call s:EnableByDefault('g:python_slow_sync')
call s:EnableByDefault('g:python_highlight_builtin_funcs_kwarg')

if s:Enabled('g:python_highlight_builtins')
call s:EnableByDefault('g:python_highlight_builtin_objs')
call s:EnableByDefault('g:python_highlight_builtin_funcs')
call s:EnableByDefault('g:python_highlight_builtin_types')
endif

if s:Enabled('g:python_highlight_all')
call s:EnableByDefault('g:python_highlight_builtins')
if s:Enabled('g:python_highlight_builtins')
call s:EnableByDefault('g:python_highlight_builtin_objs')
call s:EnableByDefault('g:python_highlight_builtin_funcs')
call s:EnableByDefault('g:python_highlight_builtin_types')
endif
call s:EnableByDefault('g:python_highlight_builtin_objs')
call s:EnableByDefault('g:python_highlight_builtin_funcs')
call s:EnableByDefault('g:python_highlight_builtin_types')
call s:EnableByDefault('g:python_highlight_exceptions')
call s:EnableByDefault('g:python_highlight_string_formatting')
call s:EnableByDefault('g:python_highlight_string_format')
Expand Down