Closed cgjosephlee closed 5 years ago
configure g:ycm_python_sys_path and g:ycm_python_interpreter_path in .vimrc NOT work
It doesn't work because these options are not defined by YCM. They are just an example of how you can set sys.path
and the Python interpreter path through Vim options with a global extra conf. You could name them to something completely different like g:my_sys_path
and g:my_interpreter_path
.
work But this is not a solution for global environment.
It is. You just need to use a global extra conf. See the g:ycm_global_ycm_extra_conf
option.
If you have more questions, please ask them on the Gitter room or the ycm-users Google group.
Issue Prelude
Please complete these steps and check these boxes (by putting an
x
inside the brackets) before filing your issue:vim --version
.:YcmDebugInfo
.:YcmToggleLogs
command.install.py
(orcmake
/make
/ninja
) including its invocationThank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.
Issue Details
I'm heavily rely on anaconda to code python in v3.6, and I installed python and a batch of packages via miniconda. I want to get autocompletions for packages installed by miniconda, so I tried following workarounds.
g:ycm_python_sys_path
andg:ycm_python_interpreter_path
in.vimrc
NOT work
sys_path
andinterpreter_path
in.ycm_extra_conf.py
and loadwork But this is not a solution for global environment.
g:ycm_python_sys_path
,g:ycm_python_interpreter_path
,g:ycm_extra_conf_vim_data
andg:ycm_global_ycm_extra_conf
in.vimrc
and link to~/.ycm_global_extra_conf.py
work
.vimrc
~/.ycm_global_extra_conf.py
Trial an error turned out to these results although I did not quite understand the differences.
Diagnostic data
Output of
vim --version
Output of
YcmDebugInfo
Contents of YCM, ycmd and completion engine logfiles
OS version, distribution, etc.
macOS 10.13.6
Output of build/install commands
YCM was built successfully with mac builtin python 2.7.10
/usr/bin/python
.