ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.36k stars 2.8k forks source link

Preview window not showing up when selecting completition. #2333

Closed joaquinlpereyra closed 7 years ago

joaquinlpereyra commented 7 years ago

Hello! Lately, I've been having an strange issue with YouCompleteMe: the preview window won't show up when selecting a completition when on a Python file (haven't tested on anything else), as one would expect. The logs don't show any weird behavior. I was afraid this was me messing up my .vimrc, so I tried with a totally blank .vimrc file, just Vundle and YCM, no luck. I even tried to force it with a let g:ycm_add_preview_to_completeopt = 1. Doesn't work either :(

I'm on Arch Linux, all up to date. Test case: a python file, select complettion, no preview window showed up.

Thanks for any help you can provide!

Vim version:

~ ❯❯❯ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep  6 2016 09:47:07)
Included patches: 1-2334
Compiled by Arch Linux
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl             +file_in_path    +mouse_sgr       +tag_old_static
+arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           +mouse_urxvt     +tcl/dyn
+balloon_eval    +folding         +mouse_xterm     +termguicolors
+browse          -footer          +multi_byte      +terminfo
++builtin_terms  +fork()          +multi_lang      +termresponse
+byte_offset     +gettext         -mzscheme        +textobjects
+channel         -hangul_input    +netbeans_intg   +timers
+cindent         +iconv           +num64           +title
+clientserver    +insert_expand   +packages        +toolbar
+clipboard       +job             +path_extra      +user_commands
+cmdline_compl   +jumplist        +perl/dyn        +vertsplit
+cmdline_hist    +keymap          +persistent_undo +virtualedit
+cmdline_info    +lambda          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       +python/dyn      +vreplace
+cscope          +lispindent      +python3/dyn     +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con_gui  +lua/dyn         +rightleft       +writebackup
+diff            +menu            +ruby/dyn        +X11
+digraphs        +mksession       +scrollbind      -xfontset
+dnd             +modify_fname    +signs           +xim
-ebcdic          +mouse           +smartindent     -xpm
+emacs_tags      +mouseshape      +startuptime     +xsmp_interact
+eval            +mouse_dec       +statusline      +xterm_clipboard
+ex_extra        +mouse_gpm       -sun_workshop    -xterm_save
+extra_search    -mouse_jsbterm   +syntax          
+farsi           +mouse_netterm   +tag_binary      
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "/etc/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_FORTIFY_SOURCE=2  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -L. -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE  -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE  -lm -lncurses -lelf -lnsl    -lacl -lattr -lgpm -ldl   -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/perl5/core_perl/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc   -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lieee -lm    

Here's the relevant part of my .vimrc:

let g:ycm_server_python_interpreter = '/usr/bin/python2'
let g:ycm_python_binary_path = '/usr/bin/python2'
let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file
let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword
let g:ycm_complete_in_strings = 1 " Completion in string
let g:ycm_add_preview_to_completeopt = 1

Here's :YcmDebugInfo:

Printing YouCompleteMe debug information...
-- Server has Clang support compiled in: False
-- Python completer debug information:
--   JediHTTP running at: http://127.0.0.1:59165
--   JediHTTP process ID: 20222
--   JediHTTP executable: /home/joaquin/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp.py
--   JediHTTP logfiles:
--     /tmp/joaquin/ycm_temp/jedihttp_59165_stdout.log
--     /tmp/joaquin/ycm_temp/jedihttp_59165_stderr.log
--   Python interpreter: /usr/bin/python2
-- Server running at: http://127.0.0.1:57613
-- Server process ID: 16528
-- Server logfiles:
--   /tmp/joaquin/ycm_temp/server_57613_stdout.log
--   /tmp/joaquin/ycm_temp/server_57613_stderr.log

And from stderr:

2016-09-14 10:46:26,241 - INFO - Received health request
2016-09-14 10:56:26,346 - INFO - Received health request
2016-09-14 10:57:02,126 - INFO - Received debug info request
2016-09-14 10:57:55,596 - INFO - Received filetype completion available request
2016-09-14 10:57:55,598 - INFO - Starting JediHTTP server
2016-09-14 10:57:55,600 - INFO - using port 59165
2016-09-14 10:57:55,640 - INFO - Received event notification
2016-09-14 10:57:55,661 - INFO - Received event notification
2016-09-14 10:57:55,662 - INFO - Adding buffer identifiers for file: /home/joaquin/faraday/gui/gtk/application.py
2016-09-14 10:57:55,695 - INFO - Received event notification
2016-09-14 10:57:55,713 - INFO - Received event notification
2016-09-14 10:57:55,714 - INFO - Adding buffer identifiers for file: /home/joaquin/faraday/gui/gtk/application.py
2016-09-14 10:57:55,740 - INFO - Received event notification
2016-09-14 10:57:58,057 - INFO - Received completion request
2016-09-14 10:57:58,161 - INFO - Received completion request
2016-09-14 10:57:58,275 - INFO - Received completion request
2016-09-14 10:57:59,737 - INFO - Received event notification
2016-09-14 10:57:59,738 - INFO - Adding buffer identifiers for file: /home/joaquin/faraday/gui/gtk/application.py
2016-09-14 10:57:59,757 - INFO - Received event notification
2016-09-14 10:57:59,758 - INFO - Adding ONE buffer identifier for file: /home/joaquin/faraday/gui/gtk/application.py
2016-09-14 10:58:03,221 - INFO - Received debug info request
2016-09-14 10:58:38,237 - INFO - Received event notification
2016-09-14 10:58:38,238 - INFO - Adding buffer identifiers for file: /home/joaquin/faraday/gui/gtk/application.py
2016-09-14 10:59:02,215 - INFO - Received completion request
2016-09-14 10:59:02,299 - INFO - Received completion request
2016-09-14 10:59:02,385 - INFO - Received completion request
2016-09-14 10:59:03,968 - INFO - Received event notification
2016-09-14 10:59:03,968 - INFO - Adding buffer identifiers for file: /home/joaquin/faraday/gui/gtk/application.py
2016-09-14 10:59:03,985 - INFO - Received event notification
2016-09-14 10:59:03,987 - INFO - Adding ONE buffer identifier for file: /home/joaquin/faraday/gui/gtk/application.py
2016-09-14 10:59:04,663 - INFO - Received event notification
2016-09-14 10:59:04,664 - INFO - Adding buffer identifiers for file: /home/joaquin/faraday/gui/gtk/application.py
joaquinlpereyra commented 7 years ago

This has been automagically fixed right after posting this issue. So weird.