jdonaldson/vaxe

Omnicompletion problem for internal phrase

Opened this issue · 12 comments

Hi,
the omnicompletion will work for packages and imports except for an internal phrase.

For example, if i type the name of a variable, it won't complete. After typing ctrl+x ctrl+o it shows me a compiler error.
vim-vaxe-omnicompletion-fail

The omnicompletion in other projects where i use python or javascript, the oc will act normal.
vim-omnicompletion-right

Ah thanks @ishands, the system information. :)
I run haxe 3.1.3.-2 with

  • Lime 1.0.1
  • OpenFL 2.0.1
  • Flixel 3.3.5

on Archlinux with gVim 7.4.410-1

I can confirm that this happens on Linux Mint 17, with stock gvim from vim-gtk.
Using NeoCompleteCache, however works around this problem.

This probably appears to be an issue with the Haxe compiler, correct me if I'm wrong.this manual page was all I was able to find concerning the completion documentation when I was experimenting with node-webkit. I did not find anything related to variable name completion. Can you try it again with this._gru|?

But why is this an issue of the haxe compiler? I think it is more a problem with vim?
This link you've shared can't help me, i think. All examples in there will currently work, except the phrase/word completion.

Vim should complete words it founds in the buffer. The completion after an dot will work correctly. So, when i type this._gru| it will complete the rest, because he looks in this..

When i type overr| it will not complete, when i type priva| it will also not complete. These are words that are currently in the buffer. When i use python/javascript files, this behavior will work.

I'm calling it on the Haxe compiler because it's supposed to keep track of the variables, and suggest them. Might go into a feature request.

Can you use NeoComplCache?
That solves the problem for me.

Ah ok, but it is not only a variable problem.

I will take a look at NeoComplCache. Hope it can help. Thanks. :)

@jdonaldson close issue?

Not so fast. ;)

The NeoComplCache will do the job but i think it is more a workaround. Or not?

Ok.
To work around the workaround, we would need to have a function which checks for words in the file. More of a generic vim problem, as you say :)

But i have the problem only when i work with haxe files. There must be an connection. :)

Then again, I don't use Vim for anything other than haxe :)

I use vim for everything. ^^

The NeoComplCache partially works. But not with AutoComplPop and the NeoComplCache autopop version works strange.

I found with YCM a better workaround. :)

Yes, I've been using YCM as well, and so I don't see this problem. In addition, I can set YCM up for fuzzy completion.

I have it in mind to add the extra feature here, but I'm not very motivated. The other completion plugins have many more features, and are much better supported.

One thing I've been pushing for is to create a library of common haxe IDE routines, to be shared across sublime text, vim, etc. Vaxe requires python, so we could use that. It would be nice not to duplicate a lot of this behavior across multiple languages and editor contexts (I also wrote the textmate bundle).

So, we can leave this issue open as a reminder, and a status indication. But, I wouldn't hold your breath for a fix in the near term :)