IntelliJ-Luanalysis icon indicating copy to clipboard operation
IntelliJ-Luanalysis copied to clipboard

Code completion for defined callbacks

Open jamestalmage opened this issue 4 years ago • 3 comments

The typescript plugin provides code completion for callback types, including filling in parameter names for the generated function. I really miss that functionality. Especially given the clunky HTTP API I'm dealing with, who's callback is:

EventHandler = function(table, code, data, errors, header) end
Screen Shot 2020-10-26 at 1 36 44 PM Screen Shot 2020-10-26 at 1 36 03 PM

This is another item I'd be happy to help on, but I feel like there's a far greater learning curve for me to get there. My Java is rusty, and I don't know the Inellij API at all. I have spent a fair amount of time writing code transforms and know my way around the Javascript AST. I would guess the LUA one is not much different, so I probably could pick it up. If you do want my help, some pointers on where to start would be helpful.

jamestalmage avatar Oct 26 '20 18:10 jamestalmage

This is a perfectly valid feature request. However, I'm not likely to get around to this one any time soon. Just because there's lots of other things for me to work on, mostly related to type checking. It's presently way too easy to get Luanalysis into a bad state where basic functionality just stops work 😊

If you do want to contribute that'd be amazing. However, fair warning, the IntelliJ API is absurdly over-engineered and under-documented. I'd argue poorly engineered too. That said, all the more reason why I'd love PRs for this project... so I don't have to do it 😉

Benjamin-Dobell avatar Oct 26 '20 18:10 Benjamin-Dobell

It's presently way too easy to get Luanalysis into a bad state where basic functionality just stops work

A failure of the type-checking system, or the plugin?

jamestalmage avatar Oct 26 '20 18:10 jamestalmage

A failure of the type-checking system, or the plugin?

Both, unfortunately. However, it's very obvious when it's happening.

Benjamin-Dobell avatar Oct 26 '20 18:10 Benjamin-Dobell