ptrv / company-lua

company-mode completion backend for Lua
17 stars 4 forks source link

Add Torch support. #6

Open se4u opened 7 years ago

se4u commented 7 years ago

Torch is a neural network library built using lua which is heavily used in machine learning community. This PR adds partial support for torch's neural network api to the company-lua backend as this screenshot shows.

image

ptrv commented 7 years ago

Tanks for the PR!

In think there needs to be a new interpreter torch, so we don't include the torch completion when not using torch.

Please add torch to company-lua-interpreter as option and in lua/complete.lua, instead of adding torch and nn to the basic apis add another check for the case interpreter == "torch" and insert the two sources only in that case.

se4u commented 7 years ago

I added the torch interpreter.