ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Dev Tools (https://www.esoui.com/forums/forumdisplay.php?f=173)
-   -   Eclipse LDT autocompletion (https://www.esoui.com/forums/showthread.php?t=7924)

sirinsidiator 07/11/18 12:15 PM

Eclipse LDT autocompletion
 
I finally have my autocompletion for Eclipse LDT at a point where I feel I can share it with everyone. You can find it here.

cloudor 11/04/18 06:40 AM

I did some hack work on LDT and made it to support some more features.

Inline comment function definition:



Type reference through pairs and ipairs:



Dots support:


sirinsidiator 11/04/18 07:44 AM

That looks interesting. Any plans for releasing it?
And one tiny suggestion. LDT already has a documentation language. Maybe you could use that instead of inventing a new one?

cloudor 11/04/18 08:21 AM

Yes, I have been using LDT's lua doc all along, but it has many limitations. For example, there is no way to define a parameter also as a function and auto-complete it in body block, like a lamda parameter. In the following example, I can use the parameter named stringProvider to create a string.



or define the result as a function too:


sirinsidiator 11/04/18 09:33 AM

Well. As far as I have tried it, the current auto completion doesn't really work anyways, aside from the EE I put together, so anything is better than what LDT currently offers. :D
But what I meant is couldn't you reuse the syntax like this:
Lua Code:
  1. --- @function StringProvider
  2. --- @return #string
  3. local function MyStringProvider()
  4.     return ""
  5. end
  6.  
  7. --- @param #StringProvider
  8. local f = function(stringProvider)
  9.     --- @param #number
  10.     --- @return #boolean
  11.     return function(n)
  12.         local s = stringProvider()
  13.         return n == s:l
  14.     end
  15. end

cloudor 11/04/18 09:51 AM

By default luadoc convention, function definitions can not be used as type directly, you need to link them by callof annotation.

Lua Code:
  1. ---
  2.     --@type StringProvider
  3.    
  4.     ---
  5.     -- @callof #StringProvider
  6.     -- @return #string
  7.     local function MyStringProvider()
  8.         return ""
  9.     end
  10.  
  11.     --- @param #StringProvider stringProvider
  12.     local f = function(stringProvider)
  13.         return function(n)
  14.             local s = stringProvider()
  15.             return n == s:l
  16.         end
  17.     end

cloudor 08/18/19 09:33 PM

I have shared my improved version of LDT.
https://dl.bintray.com/cloudor/eclipse/ldt/

Tar000un 01/05/20 04:19 AM

I wanted to go with eclipse and autocompletion. I wasn't able to get auto-completion with the zip from "Eclipse LDT Autocomplete" as execution environment. I tried to regen the zip with the tool on github within a container, but I got a zip size of ~40ko instead 290ko for the addon.

Additionally, I was able to get autocompletion with adding lib as external source folder, pointing a dir with uncompressed api.zip.

sirinsidiator 01/05/20 05:44 AM

I've actually updated the script earlier and uploaded a new version of the autocompletion. There's also a tiny inconsistency in the latest ESOUIDocumentation.txt file which makes the script fail. You'll need to add underscores (_) around the argument and return names for the InsecureNext function in the txt.

Tar000un 01/07/20 11:39 AM

Nice, for what I tested, seems working fine.
I ll check next patch about the script you commited on github. x)

And thanks. ;)


All times are GMT -6. The time now is 05:22 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI