From acb98fc7067a13ac3733169c732b3a0c70428371 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 3 Feb 2020 01:31:10 +0100 Subject: [PATCH] show_call_signatures: doc, default to 2 without 'conceal' (#994) It basically allows to give a warning when '1' is used / set explicitly, and the 'conceal' feature is not available. Also defaulting to '2' (cmdline mode) then seems better than not using it. This is just some minor clean up before https://github.com/davidhalter/jedi-vim/pull/652. --- README.rst | 6 ++++-- autoload/jedi.vim | 2 +- ftplugin/python/jedi.vim | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 95800df..1da847a 100644 --- a/README.rst +++ b/README.rst @@ -182,8 +182,10 @@ and usually saves one keypress. Jedi displays function call signatures in insert mode in real-time, highlighting the current argument. The call signatures can be displayed as a pop-up in the -buffer (set to 1, the default), which has the advantage of being easier to refer -to, or in Vim's command line aligned with the function call (set to 2), which +buffer (set to 1 by default (with the conceal feature), 2 otherwise), +which has the advantage of being easier to refer to (but is a hack with +many drawbacks since it changes the buffer's contents), +or in Vim's command line aligned with the function call (set to 2), which can improve the integrity of Vim's undo history. .. code-block:: vim diff --git a/autoload/jedi.vim b/autoload/jedi.vim index e106b47..1052325 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -27,7 +27,7 @@ let s:default_settings = { \ 'completions_enabled': 1, \ 'popup_on_dot': 'g:jedi#completions_enabled', \ 'documentation_command': "'K'", - \ 'show_call_signatures': 1, + \ 'show_call_signatures': has('conceal') ? 1 : 2, \ 'show_call_signatures_delay': 500, \ 'call_signature_escape': "'?!?'", \ 'auto_close_doc': 1, diff --git a/ftplugin/python/jedi.vim b/ftplugin/python/jedi.vim index d88dc53..5b97b9c 100644 --- a/ftplugin/python/jedi.vim +++ b/ftplugin/python/jedi.vim @@ -32,7 +32,7 @@ if g:jedi#auto_initialization execute 'nnoremap '.g:jedi#documentation_command.' :call jedi#show_documentation()' endif - if g:jedi#show_call_signatures > 0 && has('conceal') + if g:jedi#show_call_signatures > 0 call jedi#configure_call_signatures() endif