xolox / vim-lua-ftplugin

Lua file type plug-in for the Vim text editor
http://peterodding.com/code/vim/lua-ftplugin
187 stars 27 forks source link

possible to include custom .lua and .pkg file in omnifunc? #24

Closed yi closed 10 years ago

yi commented 10 years ago

Hi Peter Odding,

Many thanks for the vim-lua-ftplugin. I have been using it in my diary job, it saves me a lot of time indeed.

Now we starting working on a project heavily based on an existing c++ lua framework. I'm wondering is it possible to add the lua files and pkg files to omnifunc? So we can have the nice auto completion.

Sadly I'm not familair with the vim script language. I have tried a couple attempts, but no luck.

Could you give me some hint.

Thank you.

stormc commented 10 years ago

Do you have $LUA_PATH set to include the directory of your lua files?

xolox commented 10 years ago

I was wondering the same thing as @stormc, basically it should magically work assuming proper coding practices and an environment that allows vim-lua-ftplugin to introspect everything / most modules.

yi commented 10 years ago

Thanks @xolox and @stormc, $LUA_PATH works indeed. It was my fault. I forgot add ?.lua in the LUA_PATH