Closed markonm closed 7 years ago
Check the result of https://github.com/roxma/nvim-completion-manager/issues/52#issuecomment-336689358 and try the workaround mentioned in the next comment.
It's not opening new instances of cm_start.py anymore but I don't get any completions. It doesn't work with
let g:python3_host_prog="python3"
either.
:python3 import sys
:python3 print(sys.executable)
C:\Program Files (x86)\Vim 8\vim80\gvim.exe
:echo g:_cm_py3
python3
nvim.log_py3_neovim_rpc_server
2017-10-15 15:47:56,512 [INFO @ neovim_rpc_server.py:handle:86] 4004 - === socket opened ===
2017-10-15 15:47:56,512 [INFO @ neovim_rpc_server.py:handle:105] 4004 - received: b'[1,"neovim_rpc_setup"]\n'
2017-10-15 15:47:56,512 [INFO @ neovim_rpc_server.py:handle:121] 4004 - sending ["ex", "scall neovim_rpc#_callback()"]
version:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 12 2017 22:01:48)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-1187
Compiled by appveyor@APPVYR-WIN
Huge version with GUI. Features included (+) or not (-):
+acl +ex_extra +multi_byte_ime/dyn -tag_any_white
+arabic +extra_search +multi_lang +tcl/dyn
+autocmd +farsi +mzscheme/dyn -termguicolors
+balloon_eval +file_in_path +netbeans_intg +terminal
+browse +find_in_path +num64 -tgetent
++builtin_terms +float +ole -termresponse
+byte_offset +folding +packages +textobjects
+channel -footer +path_extra +timers
+cindent +gettext/dyn +perl/dyn +title
+clientserver -hangul_input +persistent_undo +toolbar
+clipboard +iconv/dyn -postscript +user_commands
+cmdline_compl +insert_expand +printer +vertsplit
+cmdline_hist +job +profile +virtualedit
+cmdline_info +jumplist +python/dyn +visual
+comments +keymap +python3/dyn +visualextra
+conceal +lambda +quickfix +viminfo
+cryptv +langmap +reltime +vreplace
+cscope +libcall +rightleft +wildignore
+cursorbind +linebreak +ruby/dyn +wildmenu
+cursorshape +lispindent +scrollbind +windows
+dialog_con_gui +listcmds +signs +writebackup
+diff +localmap +smartindent -xfontset
+digraphs +lua/dyn +startuptime -xim
+directx +menu +statusline +xpm_w32
-dnd +mksession -sun_workshop -xterm_save
-ebcdic +modify_fname +syntax
+emacs_tags +mouse +tag_binary
+eval +mouseshape +tag_old_static
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
defaults file: "$VIMRUNTIME\defaults.vim"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_XPM_W32 -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG /Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_MBYTE -DFEAT_GUI_W32 -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python35.dll\" -DFEAT_MZSCHEME -I "C:\Program Files\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_a0solc.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_a0solc.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl524.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=24 -DDYNAMIC_RUBY_DLL=\"x64-msvcrt-ruby240.dll\" -DFEAT_HUGE /Fd.\ObjGXOULYHTRZAMD64/ /Zi
Linking: link /nologo /subsystem:windows,5.02 /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib /machine:AMD64 gdi32.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib /machine:AMD64 libcmt.lib oleaut32.lib user32.lib /nodefaultlib:lua53.lib /STACK:8388608 /nodefaultlib:python27.lib /nodefaultlib:python35.lib "C:\Tcl\lib\tclstub86.lib" WSock32.lib xpm\x64\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug
I tried deoplete also, it works on Vim 8 on ubuntu but it's not working on Windows.
It works if I make a copy of python.exe as python3.exe. Maybe that should be added to README.md
@roxma In Windows or some Linux distribution, python is python3. Can you support it?
It's kind of hard to detect python3's executable without execute a command.
I previously tried python's sys.executable
, but it's not reliable for vim8.
Current detection code is here. It's actually nvim-yarp issue. The same goes for nvim-completion-manager.
It's actually mentioned in the README, it requires python3
in $PATH
.
This is how neovim managed to do this.
Neovim checks the interpreter by executing system command. I'm pretty sure it will slower the startup time.
Neovim checks the interpreter by executing system command. I'm pretty sure it will slower the startup time.
Oh,... It is hard to detect. But in Windows, can you detect python.exe is python3.exe?
But in Windows, can you detect python.exe is python3.exe?
It seems feasible to add Windows specific logic.
Another approach would be to issua an error message to the user if both g:python3_host_prog
, and exepath("python3")
is empty for vim8.
This doesn't make python3 auto detected, but it should be easier for user to debug.
Hm. It seems the better approach for non Windows environment.
I have added much clearer error message.
It seems there's no need to implement more complicated python3 detection.
Let's wait for more comments and see how it goes.
[roxma@roxma-pc nvim]$ vim8 -u init-deoplete.vim
[deoplete@yarp] Python3 executable [python33] not found.
[deoplete@yarp]
[deoplete@yarp] ###### Please configure g:python3_host_prog proerly ######
[deoplete@yarp]
[deoplete@yarp] executing job failed: No such file or directory
[deoplete@yarp] Job is dead. cmd=['python33', '/home/roxma/.config/nvim/plugged-deoplete/nvim-yarp/pythonx/yarp.py', '127.0.0.1:40133', 2, 'deoplete']
[deoplete] [yarp] [deoplete] job is dead. failed establishing channel for ['python33', '/home/roxma/.config/nvim/plugged-deoplete/nvim-yarp/pythonx/yarp.py', '127.0.0.1:40133', 2, 'deoplete']
[deoplete] function deoplete#enable[1]..deoplete#initialize[1]..deoplete#init#_initialize[9]..deoplete#init#_channel[10]..yarp#core#notify[1]..yarp#core#wait_channel, line 13
[deoplete] deoplete requires nvim-yarp plugin.
Press ENTER or type command to continue
I have improved and tested vim-hug-neovim-rpc and nvim-yarp. The error messages are better and easy to debug. Nice work!
OS: window 10 x64 Vim: v8.0.1188 x64 Python 3.5.4 x64
When I install NCM and vim-hug-neovim-rpc, cm_start.py is being opened endlessly in new instances of Vim.