carlitux / deoplete-ternjs

deoplete.nvim source for javascript
MIT License
277 stars 24 forks source link

Completions not working until full method is typed #61

Closed ctaylo21 closed 6 years ago

ctaylo21 commented 6 years ago

Is this expected behavior?

For a requireJS project, I have tern working correctly. However, it will only correctly identify the method with the associated docs once I have the method fully-typed out. For example, if there is an object called settings and it has several methods called getVar1 and getVar2 and getLocale, etc..

I will not get suggestions for any of those when I type settings.get. Only when I type settings.getVar1 completely, then backspace to just have settings.get do I start getting TernJS suggestions for all the other methods with their docs. Is this a setting that I can update?

carlitux commented 6 years ago

http://ternjs.net/doc/demo/index.html here there is a demo from the project please try there if it works there please send me the steps to reproduce and fix. If it is not working maybe ternjs doesn't support it.

ctaylo21 commented 6 years ago

All of those examples work in my editor with my setup. So it appears that Tern is working as intended. My guess is that my requireJS project is triggering some odd edge cases. When I opened neovim today, it is full completing the object that it wasn't yesterday without having to fully-type out method names. Yet other methods aren't completing like I would expect. I will continue to look at this and see what I can figure out.

I will close this until I get some more concrete info.