tern_for_vim icon indicating copy to clipboard operation
tern_for_vim copied to clipboard

Autocompletion renderd buffer unusable (Stratch)

Open lfilho opened this issue 12 years ago • 7 comments

I was testing the plugin out the commands were running ok, and I tried the auto completion with the following code:

   it('...', function(){
       var m = new Foobar({ ... });

       expect(m.userId).toEqual('6815841748');
   });

then after the var = m bit I hit o (new line + insert mode) and type m.. It completed to m.userId automatically but the the buffer was converted into a [Scratch] - PRV and I couldn't edit it anymore - kept me giving the E523: Not allowed here.

And in the terminal (I had opened MacVim from there) there was this: Exception TypeError: "'NoneType' object is not callable" in <bound method Project.__del__ of <__main__.Project object at 0x110d22150>> ignored

Using MacVim. With neocomplcache plugin (maybe a conflict?)

lfilho avatar May 22 '13 10:05 lfilho

Doesn't happen for me -- but I'm on Linux, and I don't have neocomplcache. Try disabling that. Does this happen consistently when you follow these steps?

@clausreinke This might be related to the preview window functionality. Any ideas?

marijnh avatar May 23 '13 09:05 marijnh

Doesn't happen here, either. Agree, try disabling neocomplcache plugin first, to reduce the number of moving parts.

(which reminds me, tern doesn't support Vim standard for disabling plugins: :help write-filetype-plugin)

clausreinke avatar May 23 '13 19:05 clausreinke

:8ball: neocomplcache does conflict with tern plugin

snj33v avatar May 24 '13 06:05 snj33v

Too bad. Did you see why they conflict, and how we might work around that?

@clausreinke As for disabling plugins -- is pasting in the (somewhat silly) code at the top of that help topic the solution you'd recommend?

marijnh avatar May 24 '13 06:05 marijnh

@marijnh I don't usually disable plugins that way, just noticed that it might come in handy for things like conflict checking/avoidance. And no, it isn't quite as simple: tern is currently configured as an add-on to the javascript filetype plugin, so it cannot use b:did_ftplugin (which is set by the default javascript plugin). One could use a tern-specific flag to disable tern loading, similar to the recommendation for general plugins (:help write-plugin|/LOADING). Not sure whether it is worth it, though.

As for neocomplcache, it seems to be one of those completion-multiplexer/extender things, offering different kinds of completion under the same keybinding, so it might not even be a conflict, more a case of needing an adapter. But that is just a guess.

clausreinke avatar May 24 '13 08:05 clausreinke

Hi, I'm author of neocomplcache. I will try this issue later.

Shougo avatar Jun 05 '13 09:06 Shougo

I tested your code in neocomplcache and neocomplete. But it worked("m.userID" is completed).

screenshot

So, I think it is not neocomplcache problem.

Note: I don't set tern.vim's configuration.

Shougo avatar Jun 05 '13 23:06 Shougo