davidhalter / jedi-vim

Using the jedi autocompletion library for VIM.
MIT License
5.27k stars 370 forks source link

Disable call signature hints if auto_initialization is off #1046

Open adigitoleo opened 3 years ago

adigitoleo commented 3 years ago

I recently changed my completions setup (again...) to use omnifunc=jedi#complete directly. I have mappings etc. already so I promptly set:

let g:jedi#auto_initialization = 0
let g:jedi#auto_vim_configuration = 0

in my vimrc, which mostly worked as expected. However, I still got call signature hints, which weren't cleared after exiting insert mode. From :h g:jedi#show_call_signatures:

Note: This setting is ignored if |g:jedi#auto_initialization| is set to 0. In
that case, if you want to see call signatures, you have to set it up
manually by calling a function in your configuration file: >

In other words, the autocommand block in jedi#configure_call_signatures() is not run, however the call signatures option is still enabled:

     'show_call_signatures': has('conceal') ? 1 : 2

This results in broken call signature hints. Would it be possible to disable call signature hints if auto_initialization is off? I guess this is sort of mentioned in :h g:jedi#auto_initialization as one of the functions it performs:

3. Call `jedi#configure_call_signatures()` if
   `g:jedi#show_call_signatures` is set

but it doesn't explicitly warn that show_callsignatures will not be turned off.

Just a little suggestion for QoL improvement. Thanks for jedi! :)