Odd Characters Displayed in Function Arguments Tooltips in Jedi-Vim

465 views Asked by At

I'm trying out the currently available master branch of Jedi-Vim and the Jedi library with gVim 7.4 (Windows), +python is available and working. I have installed Jedi-Vim with Pathogen. No other plugins are installed, I have Jedi-Vim and Pathogen only. My .vimrc doesn't implement anything fancy.

Jedi-Vim has been an awesome tool so far most everything is working; however I've noticed that function argument tooltips popup with some garbled characters before the tooltip text starts, for example the print() tooltip popoup looks like (the a's actually have a circumflex accent):

^          ^                                                               ^      ^
a%ijedi=0, a%i    (*value*, ..., sep = ' ', end = '\n', file = sys.stdout) a%ijedia%i 
print(

So, the print() function argument help is there, but is surrounded by odd strings of characters. Has anyone else encountered this issue? The pictures at the repo show tooltips without the extra crazy characters. I'm thinking this may have something to do with my use of this on Windows, or with the fact I'm using the Jedi library as a subrepo at C:\vim\vim74\bundle\jedi-vim-master\jedi. Any suggestions?

1

There are 1 answers

0
Artem On

It happened with me also couple months ago. And I couldn't find any elegant solution with jedi-vim, but thankfully I found python-mod that became part of my solution for this issue.

Ok, my way was:

1.Invoke pathogen by

call pathogen#infect()

2.disable call signatures in jedi-vim like that

let g:jedi#show_call_signatures = 0

According to the docs there are three mods for this option, 0 stands for not show signatures at all, 1 (by default) show all signature in popup small window (with which I had problem), and finally 2 stands for show signatures in command line. You may prefer use command line to show signatures.

3.install python-mode

I use python-mode without it's "rope". For me it seems jedi-vim better in autocompletion and I use it on this field, but python-mode got a lot features that can be useful even without autocompletion.

" Settings for python-mode

let g:pymode_virtualenv = 1 
let g:pymode_folding = 0                                
let g:pymode_utils_whitespaces = 0                                
let g:pymode_syntax = 0                                           
let g:pymode_lint_ignore = "C0110 Exported"
let g:pymode_lint_minheight = 5       
let g:pymode_lint_maxheight = 15
let g:pymode_lint_write = 1
let g:pymode_lint_mccabe_complexity = 10
let g:pymode_syntax_highlight_self = 0
let g:pymode_doc = 0
let g:pymode_rope = 0

let g:pymode_run = 1
let g:pymode_python = "python"
let g:pymode_run_bind ='<F5>'


" Settings for jedi-vim

let g:jedi#usages_command = "<leader>z"
let g:jedi#popup_on_dot = 1
let g:jedi#popup_select_first = 0
map <Leader>b Oimport ipdb; ipdb.set_trace() # BREAKPOINT<C-c>

I hope it'll help you.