Glider’s AutoComplete functionality is very powerful, no doubt there. However, I have found some small bugs in it and would also like to offer new features that will make it even better. Let’s begin.
Bugs
1. When using “self” as a param in a local function Glider gets confused and doesn’t work as expected.
Example:
[lua]—Collision of everything
– @param self @class hero
– @param event @class collisionEvent
– @return
local function collision (self, event)[/lua]
In this example glider will think var “event” is of class “hero” instead of class “collisionEvent”. I’m not sure what exactly it assigns to var “self”, but it looks like the current viewable file/module. Naturally, if I will change the function itself to hero:collision and only define “event” as a param, things will work perfectly, but requires me changing the actual code in a way I don’t want to.
2. When looking in the Documentation Viewer(Luadoc), the param names are a part of the description.
For example:
[lua]-- @param hero @class heroClass Description of this param[/lua]
the word hero will be in the description itself. Currently I found that simply not typing the name “fixes” it, like this:
[lua]-- @param @class heroClass Description of this param[/lua]
3. Class instances that have different forms of the same function will always show the same form no matter which one you pick. The 2 pics below explain it:
As you see, even tho I picked the 2nd option, Glider will always show me auto completion for the option with Gradient (3rd option)
4. Strings with Enumerations don’t show up as strings in the Auto Complete popup:
Also for some reason they always have one extra empty Enumeration.
requests
1. Show the Luadoc description of the function + currently inputted param/variable in the AutoComplete popup itself (instead of having to open to the documentation viewer)
2. Option to remove table functions auto completion. It gets really annoying seeing them over and over everywhere. I currently edited the premade stubs and removed “= {}” from every @classdef just so they wont show. (conact, insert, maxn, remove, sort)
3. Typing —@class would show a list of all available auto completion classes
4. When hovering over a variable glider will show a little popup window saying its class.
5. instead of typing @param + @class in every function, have anything after @ count as a param, and anything after a different symbol such as # count as class. this will make the code much cleaner.
for example:
[lua]— Function description
– @param myObject A display Object that will be rotated @class DisplayObject
– @param myString A string that will be printed @class string
– @param myHero The hero of the game @class heroClass
function myFunction(myObject, myString, myHero)[/lua]
will become:
[lua]— Function description
– @myObject: A display Object that will be rotated #DisplayObject
– @myString: A string that will be printed #string
– @myHero: The hero of the game #heroClass
function myFunction(myObject, myString, myHero)[/lua]