I have migrated from vim to nvim and everything seemed to work fine. I'm trying to figure out how to enable xdebug on nvim (it used to work fine before). So I ran to an issue when I tried to install this plugin: https://github.com/vim-scripts/DBGp-Remote-Debugger-Interface
When I try to install it using Vundle, I get this error
debugger.vim: Unable to find debugger.py. Place it in either your home vim directory or in the Vim runtime directory.
the thing is that the file does exist (my vim runtime path is ~/.vim
):
~/.vim/bundle/DBGp-Remote-Debugger-Interface/plugin/debugger.vim
~/.vim/bundle/DBGp-Remote-Debugger-Interface/plugin/debugger.py
I even put a symlink on ~/.vim
:
~/.vim $ ls -n
debugger.py -> bundle/DBGp-Remote-Debugger-Interface/plugin/debugger.py
still same error. What am I missing?
References
nvim health check output:
see this gist: https://gist.github.com/abbood/36788e9832f287e477d24567a9266a0d
my init.vim
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath=&runtimepath
source ~/.vimrc
let g:python3_host_prog='/Users/abdullah/.pyenv/shims/python3'
let g:python_host_prog='/Users/abdullah/.pyenv/shims/python'
update
After copying debugger.py
to ~/.vim/plugin
as suggested in the answer by Martin Turnoiji, it worked but now I'm getting this error:
Error detected while processing function provider#python#Call:
line 18:
Error invoking 'python_execute_file' on channel 3 (python3-script-host):
error caught in request handler 'python_execute_file ['/Users/abdullah/.vim/plugin/debugger.py', 1, 1]':
Traceback (most recent call last):
File "/Users/abdullah/.pyenv/versions/3.6.3/lib/python3.6/site-packages/pynvim/plugin/script_host.py", line 108, in python_execute_file
script = compile(f.read(), file_path, 'exec')
File "/Users/abdullah/.vim/plugin/debugger.py", line 371
print "exec does not supported by xdebug now."
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(print "exec does not supported by xdebug now.")?
Error invoking 'python_execute' on channel 3 (python3-script-host):
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'debugger_init' is not defined
this error is happening in this line. I'm guessing that it is being executed by python3 when it should be executed by python2. How can I instruct vim (or nvim) to specifically run this plugin using python2?