One issue I have with nix-shell is, that the YouCompleteMe code completion engine does not work in vim when started from a nix-shell.
Reproduce:
- install arch
- install vim
- install vim-youcompleteme-git from AUR
- install nix
- setup holonix
- holonixify a repo
- start nix-shell
-
hc package
… works fine - open some rust file with vim … ycm doesn’t work
desired behavior:
ycm works in vim
observed behavior:
ycm server fails to start, error log:
Traceback (most recent call last): File "/nix/store/v5ifc15l78lmdlw8imhixch81dd5cclz-python3-3.7.5/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/nix/store/v5ifc15l78lmdlw8imhixch81dd5cclz-python3-3.7.5/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/share/vim/vimfiles/python/ycm/../../third_party/ycmd/ycmd/__main__.py", line 199, in <module> Main() File "/usr/share/vim/vimfiles/python/ycm/../../third_party/ycmd/ycmd/__main__.py", line 166, in Main code = ImportAndCheckCore() File "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/utils.py", line 638, in ImportAndCheckCore LoadYcmCoreDependencies() File "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/utils.py", line 623, in LoadYcmCoreDependencies ctypes.cdll.LoadLibrary( libclang_path ) File "/nix/store/v5ifc15l78lmdlw8imhixch81dd5cclz-python3-3.7.5/lib/python3.7/ctypes/__init__.py", line 442, in LoadLibrary return self._dlltype(name) File "/nix/store/v5ifc15l78lmdlw8imhixch81dd5cclz-python3-3.7.5/lib/python3.7/ctypes/__init__.py", line 364, in __init__ self._handle = _dlopen(self._name, mode) OSError: libclangAST.so.9: cannot open shared object file: No such file or directory
libclangAST.so.9 does exist on my system:
/usr/lib/libclangAST.so.9
Usually ycm and vim work fine on my system.
Any ideas, how can I get ycm working when running vim from a holochain.love nix-shell?