tsuquyomi icon indicating copy to clipboard operation
tsuquyomi copied to clipboard

Error detected ... tsuquyomi#complete: Key not present in dicitionary

Open ajcrites opened this issue 7 years ago • 3 comments

Whenever I try to use Omnicompletion after first loading a TypeScript file, I get this error.

Error detected while processing function tsuquyomi#complete:
E716: Key not present in Dictionary: 0
E15: Invalid expression: l:res_list[i]
E121: Undefined variable: info
E15: Invalid expression: {'word': info.name, 'menu': info.kind }
E121: Undefined variable: l:item
E116: Invalid arguments for function complete_add

I can load a file and run Omnicompletion <C-x><C-o> for example, and the above error will appear once.

After I clear the error, omnicompletion seems to work okay from then on -- it only happens initially.

Is there any way to prevent this entirely or to do whatever Tsuquyomi needs to do to get Omnicompletion to work properly when the file loads instead of having to do manual Omnicompletion once to get through the error?

ajcrites avatar Feb 07 '18 20:02 ajcrites

I'm also experiencing this exact issue.

patreeceeo avatar Sep 30 '18 20:09 patreeceeo

Looks like on line 329 of autoload/tsuquyumi tsuquyomi#tsClient#sendCommandSyncResponse is returning {"reloadFinished":1} instead of an array as expected. I can work around this for now by adding an extra identical call to tsuquyomi#tsClient#sendCommandSyncResponse and just use the result of the second call.

patreeceeo avatar Sep 30 '18 20:09 patreeceeo

Looks to be fixed by #254

johnkchow avatar Oct 23 '18 14:10 johnkchow