LÖVE-IDEA-Plugin (LÖVE Plugin for IntelliJ Idea)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

LÖVE-IDEA-Plugin (LÖVE Plugin for IntelliJ Idea)

Post by rmcode »

This plugin enables auto-complete functionality for functions of the LÖVE-framework while using Lua for IntelliJ Idea.

Image

The plugin is auto-generated from the LÖVE-API-Documentation.

Download and instructions on github.
Last edited by rmcode on Sat Dec 26, 2015 10:49 am, edited 4 times in total.
Santos
Party member
Posts: 384
Joined: Sat Oct 22, 2011 7:37 am

Re: LOVE-IDEA-API (LÖVE API for IntelliJ Idea)

Post by Santos »

There's the LÖVE API in Lua table here: http://santos.nfshost.com/love_api.lua

With it you could automatically create files with something like this:

Code: Select all

api = require('love_api')

love.filesystem.append('love.lua', "module('love')\r\n")

for i, f in ipairs(api.callbacks) do
	love.filesystem.append('love.lua', 'function '..f.name..'() end\r\n')
end

for i, f in ipairs(api.functions) do
	love.filesystem.append('love.lua', 'function '..f.name..'() end\r\n')
end

for i, m in ipairs(api.modules) do
	love.filesystem.append(m.name..'.lua', "module('love."..m.name.."')\r\n")
	for ii, f in ipairs(m.functions) do
		love.filesystem.append(m.name..'.lua', 'function '..f.name..'() end\r\n')
	end
end
I'm not sure how the API files for IntelliJ IDEA work, but you might be able to modify the code above to add parameters, descriptions, and object methods.
FryDay444
Prole
Posts: 6
Joined: Thu Aug 28, 2014 4:42 pm
Contact:

Re: LOVE-IDEA-API (LÖVE API for IntelliJ Idea)

Post by FryDay444 »

rmcode wrote:I've been using IntelliJ Idea to code in Lua for a long time. Somewhere along the way I created my own API to have auto-complete functionality for all LÖVE functions.
If this works...I think I might love you. (no pun intended)
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LOVE-IDEA-API (LÖVE API for IntelliJ Idea)

Post by rmcode »

Santos wrote:I'm not sure how the API files for IntelliJ IDEA work, but you might be able to modify the code above to add parameters, descriptions, and object methods.
Afaik there is a way to have docs too ... but I couldn't get it to work last time I tried. I'll give it another shot!
FryDay444 wrote:
rmcode wrote:I've been using IntelliJ Idea to code in Lua for a long time. Somewhere along the way I created my own API to have auto-complete functionality for all LÖVE functions.
If this works...I think I might love you. (no pun intended)
It works here :) If you have troubles setting it up just ping me and I'll try to post some clearer instructions.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LOVE-IDEA-API (LÖVE API for IntelliJ Idea)

Post by rmcode »

Pushed a new update. (Re-)Generated the API with the help of the love api and the code Santos posted above.
FryDay444
Prole
Posts: 6
Joined: Thu Aug 28, 2014 4:42 pm
Contact:

Re: LOVE-IDEA-API (LÖVE API for IntelliJ Idea)

Post by FryDay444 »

rmcode wrote:Pushed a new update. (Re-)Generated the API with the help of the love api and the code Santos posted above.
Haven't had a chance to test this yet, but it doesn't appear like your API shows arguments, does it? If not, any chance of implementing it?
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LOVE-IDEA-API (LÖVE API for IntelliJ Idea)

Post by rmcode »

FryDay444 wrote:Haven't had a chance to test this yet, but it doesn't appear like your API shows arguments, does it? If not, any chance of implementing it?
I played around with the custom documentation feature of the lua plugin, but it seems like it is broken - I can't get it to work properly at least.

The maintainer of the API seems to be pretty busy so I'm not sure if it'll ever be fixed :?
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LOVE-IDEA-API (LÖVE API for IntelliJ Idea)

Post by rmcode »

Just a quick heads up that the plugin doesn't work (correctly) under IntelliJ Idea 14. So until the author decides to update I recommend using IntelliJ Idea 13.1.6.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LÖVE-IDEA-Plugin (LÖVE Plugin for IntelliJ Idea)

Post by rmcode »

The plugin is updated to LÖVE version 0.9.2 and now lives at github.

P.S.: Lua plugin for IntelliJ IDEA now also works with IDEA 14.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LÖVE-IDEA-Plugin (LÖVE Plugin for IntelliJ Idea)

Post by rmcode »

Pushed a minor update adding some previously missing functions.

Code: Select all

- Update love.filesystem module in 0.9.2 plugin.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests