codi.vim
codi.vim copied to clipboard
Throws errors when Tern is installed
I don't know if this is an issue with Codi or TernJS, but I often see errors like this while I'm typing:
![screen shot 2016-08-19 at 5 37 53 pm](https://cloud.githubusercontent.com/assets/1797328/17809620/7b2bfbac-6635-11e6-80fa-ec8d7d9b428a.png)
Any idea what could be causing them and how to fix it?
That's interesting - how consistently and with what frequency does this issue happen? Is it with every keystroke, or seemingly at random on some keystrokes? My suspicion that the asynchronous buffer switching that Codi does is interrupting the tern_sendBufferIfDirty
call. In the event where the buffer switches at, for example, this line of code, it's impossible to guarantee correctness, as there is no way for Codi to acquire a communal lock with any other plugin.
It's seemingly at random on some keystrokes. Perhaps it's worth disabling Tern when Codi is enabled.
I'll take a closer look when I get the chance, but it is unlikely that this issue will be fixed. If anything, I'll add a warning about the asynchronous buffer switching Codi does behind the scenes to the documentation.
Sure. Thanks for the useful plugin!
Hey, it just occurred to me - have you tried using Tern + Codi with g:codi#sync = 1
? This might "fix" the problem, in the sense that it will work with synchronous code.
Nope, I haven't tried that yet - let me do that and get back to you.