Closed qwence closed 3 years ago
Fixed.
Thanks for looking into this! I tried the updated version on the example above and am getting the following error after entering insert mode and typing one character:
[deoplete] Traceback (most recent call last):
File "/home/qwence/.vim/bundle/deoplete.nvim/rplugin/python3/deoplete/child.py", line 203, in _gather_results
result = self._get_result(context, source)
File "/home/qwence/.vim/bundle/deoplete.nvim/rplugin/python3/deoplete/child.py", line 267, in _get_result
ctx['candidates'] = source.gather_candidates(ctx)
File "/home/qwence/.vim/bundle/deoplete-rtags/rplugin/python3/deoplete/sources/deoplete_rtags.py", line 44, in gather_candidates
completions_json = json.loads(stdout_data_decoded)
File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Error from rtags: Expecting value: line 1 column 1 (char 0) Use :messages / see above for error details.
It is not deoplete or echodoc problem. It is deoplete-rtags problem. The json data seems broken.
It should catch JSON errors.
You can create issue for deoplete-rtags but it is old source. It may not be supported.
Never mind; it works now. (It turns out I'd accidentally killed rdm so that was producing an error message instead of json.) Thanks for the fix!
Oh, OK.
I have created ddc-rtags. You can use it instead.
I'm using deoplete with rzaluska/deoplete-rtags for C++. As you can see in the screencast below, deoplete is correctly recognizing the signature of the function being typed, but echodoc only gives the popup myfunc() instead of myfunc(int x, int y).
Screencast: https://asciinema.org/a/VI5qopfM7kckYpqYZHMoWAj72
Minimal init.vim
example.cpp
Makefile (for the rtags setup)
Instructions for using the rtags plugin (after installing it): install rtags and bear, copy example.cpp and Makefile into a directory, and run