ycm-core / YouCompleteMe

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

ValueError: No semantic completer (php and others) #1449

Closed TheTrope closed 9 years ago

TheTrope commented 9 years ago

Hi, I'm trying to install YCM for few hours but i go some issues when i :YcmCompleter i got: ValueError: No semantic completer exists for filetypes: [u'php']

Php completion don't work, i even have phpcomplete. Ex : if i write $ar = array and then ctrl space it is working but not on the fly cap

Here is my version of vim:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 12 2015 15:02:15) Rustines incluses : 1-692 Compilé par thetrope@TheTrope Énorme version avec interface graphique GTK2. Fonctionnalités incluses (+) ou non (-) : +acl +farsi +mouse_netterm +syntax +arabic +file_in_path +mouse_sgr +tag_binary +autocmd +find_in_path -mouse_sysmouse +tag_old_static +balloon_eval +float +mouse_urxvt -tag_any_white +browse +folding +mouse_xterm -tcl ++builtin_terms -footer +multi_byte +terminfo +byte_offset +fork() +multi_lang +termresponse +cindent +gettext -mzscheme +textobjects +clientserver -hangul_input +netbeans_intg +title +clipboard +iconv +path_extra +toolbar +cmdline_compl +insert_expand -perl +user_commands +cmdline_hist +jumplist +persistent_undo +vertsplit +cmdline_info +keymap +postscript +virtualedit +comments +langmap +printer +visual +conceal +libcall +profile +visualextra +cryptv +linebreak +python +viminfo +cscope +lispindent -python3 +vreplace +cursorbind +listcmds +quickfix +wildignore +cursorshape +localmap +reltime +wildmenu +dialog_con_gui -lua +rightleft +windows +diff +menu +ruby +writebackup +digraphs +mksession +scrollbind +X11 +dnd +modify_fname +signs -xfontset -ebcdic +mouse +smartindent +xim +emacs_tags +mouseshape -sniff +xsmp_interact +eval +mouse_dec +startuptime +xterm_clipboard +ex_extra -mouse_gpm +statusline -xterm_save +extra_search -mouse_jsbterm -sun_workshop +xpm fichier vimrc système : "$VIM/vimrc" fichier vimrc utilisateur : "$HOME/.vimrc" 2me fichier vimrc utilisateur : "~/.vim/vimrc" fichier exrc utilisateur : "$HOME/.exrc" fichier gvimrc système : "$VIM/gvimrc" fichier gvimrc utilisateur : "$HOME/.gvimrc" 2me fichier gvimrc utilisateur : "~/.vim/gvimrc" fichier menu système : "$VIMRUNTIME/menu.vim" $VIM par défaut : "/usr/share/vim" $VIMRUNTIME par défaut : "/usr/share/vim/vim74" Compilation : gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Édition de liens : gcc -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -L/build/buildd/ruby1.9.1-1.9.3.484/debian/lib -rdynamic -Wl,-export-dynamic -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl -lselinux -ldl -L/usr/lib/python2.7/config -lpython2.7 -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm -L/usr/lib

Thanks for your help :)

vheon commented 9 years ago

A completer for YCM is a Native completer, like jedi, omnisharp or libclang. phpcomplete is a vim plugin which provide an omnifunc and YCM use that.

Now, what do you mean by, "don't work" in:

Php completion don't work, i even have phpcomplete.

Please read CONTRIBUTING.md, closing until more info are provided.

TheTrope commented 9 years ago

Now i reinstalled all with vundle instead of pathogen and its working for all files but not c# .cs files The YcmDebugInfo tells me that the omnisharp server is not running.

:YcmCompleter StartServer (or Restart server) RuntimeError: Autodetection of solution file failed.^@

:YcmCompleter ReloadSolution InvalidURL: Failed to parse: localhost:None

I'm currently reading some things about the .sln files

Thanks for your help !

vheon commented 9 years ago

If I'm not mistaken there is a problem with the way we detect a native completer at the moment (see https://github.com/Valloric/YouCompleteMe/issues/1284#issuecomment-83684878) so the native completer for C# is there but you have to build it with the --omnisharp-completer flag when you build YCM.

TheTrope commented 9 years ago

Yeah but i built it with both --omnisharp-completer and --clang-completer flags, so it shouldn't be the problem

Any idea ? Thank you

vheon commented 9 years ago

Oh yeah, the SolutionFile must be present at the moment until https://github.com/Valloric/ycmd/issues/101 is resolved.

TheTrope commented 9 years ago

Oh okay thanks, i'll read the docs to see how to make a solutionfile then.

jasonhzy commented 8 years ago

I have the same question,but i cannot solve it