Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
TabNine results yield duplicate letters #45
I'm using TabNine latest, nvim latest, with the deoplete plugin. macOS latest as well. I have semantic completion enabled with solargraph (also latest) as the backend (stdio). My TabNine.toml, .solargraph.yml, and .vimrc files are located here: https://github.com/jaydorsey/dotfiles
I see an issue where the TabNine results show an extra/duplicate letter as in the screenshot below:
If I press enter/return it enters the text as present (with the extra character).
Stopping & restarting nvim makes the problem go away, but not for very long.
I don't remember it doing this when I first enabled semantic completion, but I might be mistaken. It seems to have manifested over the last update or two. I've seen it happen with one other user but they have nearly the same setup I have.
Things I've tried that didn't work:
My mostly empty vimrc file:
This does appear to affect things like trying to type
My next step is to try to revert back to an older version of TabNine to see if I could isolate it vs solargraph but I wanted to see if anyone else was having similiar issues or could recommend a setting I haven't looked at.
One other thing I noticed that may be relevant:
This happens almost always within 2-3 minutes of starting vim, with TabNine enabled. This makes it impossible to use because I spend more time moving around deleting text than the time it saves me with autocomplete
This screenshot is with all my plugins, but the behavior was the same with the lightweight vimrc file I posted earlier.
Thanks for the info @Shougo. Knowing I'm not the only one should (hopefully) help me narrow down the root cause. I may try the tabnine.vim plugin and see if it occurs there too.
@Shougo, I noticed this error immediately before the duplication occurred most recently.
I'm not sure exactly what I did right before that; I was just writing code.
Edit: I get an error identical to the above every time, then I start getting the duplication in results. Would this be better moved over to deoplete repo as an issue there?
Yes. I have got the same result.
But it is not every time for me.
No. It is not deoplete or deoplete-tabnine's error.
Please enable debug mode in deoplete-tabnine and upload the log file when the error is occured.
call deoplete#enable_logging('DEBUG', 'deoplete.log') call deoplete#custom#source('tabnine', 'is_debug_enabled', 1)
I captured a log here: https://gist.github.com/jaydorsey/ad79704a05d9b3fe29b82bbd874e08be
I replaced my actual code with
I'm also able to reproduce this issue reliably now, in at least one scenario. I tried to capture the key commands in the gif below:
I sometimes have to backspace/type new character a couple times to trigger it.
Possibly of note:
Maybe unrelated, but
More info on the behavior. I don't know if this would help identify the root cause or not but:
After the issue triggers, when I type a single letter, it reads the previous match (my cursor is after the
Typing a second character shows me the doubling:
Deleting a character skips the doubling again (replaced
I've noticed sometimes though, with some words, it's fine. Until i backspace and re-type and then it's all messed up again.
Here's what I think is happening: TabNine is printing an extra line in its output, causing the
I think TabNine is printing something to stderr. In the most recent version I added some code which logs errors to stderr. This would also explain why I haven't experienced the issue with Sublime, because tabnine-sublime redirects stderr to devnull (L92) whilie deoplete-tabnine redirects it to stdout (L139).
In the next version I will change TabNine to avoid printing to stderr. In the meantime, you could try changing your deoplete-tabnine to redirect stderr to devnull and see if that fixes the issue.