Open kwon-young opened 8 years ago
Hi @kwon-young ,
I would really love to use this plugin with Torch as well. I can reproduce your error with a fresh install of Torch. After digging around a bit, I think the problem is happening in
https://github.com/xolox/vim-lua-ftplugin/blob/master/autoload/xolox/lua.vim#L447
Namely, the returned output
list variable has two elements that are:
Torch 7.0 Copyright (C) 2001-2011 Idiap, NEC Labs, NYU
Torch 7.0 Copyright (C) 2001-2011 Idiap, NEC Labs, NYU
Then, these two lines are passed to the eval
call and we end up with the Undefined Variable: Torch
error.
@xolox do you have any pointers on how we can debug this further?
Edit: Ah ok! I think I know what is happening. This vimscript takes as output everything that is printed by omnicomplete.lua
. However, one of the Torch scripts prints Torch 7.0 ...
to stdout when included.
So, this plugin works if you comment out the print statement in the beginning of ~/torch/install/share/lua/5.1/env/init.lua
(your path will likely vary).
Hi, I would like to use this plugin with the framework torch. For now, i installed the plugin with vim-plug and the plugin doesn't seem to work well. After rapidly reading the doc, i set these settings in my vimrc:
Torch installation embed a custom lua interpreter, however i'm a new to lua so i don't really know how to configure the plugin to make things work.
When i try the omni completion, i have the following error:
Also the
gf
mapping doesn't really work