2

I saw that there is a lua plugin for eclipse and there is a docpage on the awesome main page api_doc and all the .lua files in /usr/share/awesome/lib.

So I thought it must be possible to create a Library or Execution Environment so that one has tabcompletion and docview.

So I tried making my own Execution Environment:

  • wrote the standard .rockspec file
  • downloaded the documentation made an ofline version of it and put it in docs/ folder
  • ziped the files and folders in /usr/share/awesome/lib
  • ziped all up

tried it out ... and it failed. When I try to view a documentaion for a .lua file I get "Note: This element has no attached documentation."

Questions: Am I totaly wrong in my doing (because I have the feeling I am)? Is there any way to edit the rc.lua with tabcompletion and docview?

Berxue
  • 21
  • 2
  • To keep this up to date: It seems the .lua files are commented in LDoc but "Lua Development Tools" in eclipse uses just a documentation similar to LDoc so it can be that the comments ar just not recognized in the right way. – Berxue May 31 '14 at 18:55

2 Answers2

1

Koneki will probably take a while to setup, but it's definitly worth it. Going for the".doclua"(by using version 1.2) would certainly make it, but I doubt that using a script to generate the information you need, would work out on the long run.

Most likely, you'll probably pass a bit of time to define what kind of object you're dealing with every time you come across one. The right to do, would be to actually take the time to see if the object/module/inner type inherit from an another object, so can actually have more completion feature as you keep using autocomplete to go from one object to another by pressing "dot"+ctrl_space.

In an ideal world, one person could probably make it right and share to other, so they can enjoy a full featured autocomplete editor.

antogerva
  • 549
  • 1
  • 9
  • 22
0

Found solution for eclipse.

First off the idea of setting up an Execution environment was the wrong one. So the whole thing about downloading the doc although. For more information on that visit eclipse Wiki for LUA Development Tool. The right thing to do is to add a source folder which contains the /usr/share/awesome/lib directory.

The bad news is that my comment from above was totally right, which means one has to configure each .lib file in /usr/share/awesome/lib to meet the requirements of the Documentation Language described here. Than editing the rc.lua (which one can add to the project in eclipse) works with tabcompletion and doc view.

Since the Documentation Language used in the lib files is similar to the one used by "LUA Development Tool" one has not to change many things. Maybe there are even scripts for that.

Berxue
  • 21
  • 2