Lua code formatter

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Lua code formatter

Eliott Dumeix
Hello,

Just to show my lua code formatter written in python3.

Project is in progress, still some bugs to fix.

Any feedback appreciated :)

https://github.com/boolangery/py-lua-style

Bye


Reply | Threaded
Open this post in threaded view
|

Re: Lua code formatter

Dirk Laurie-2
2018-06-06 11:03 GMT+02:00 Eliott Dumeix <[hidden email]>:

> Just to show my lua code formatter written in python3.

That is a serious affront. Surely Lua itself is perfectly adequate for the task?

Reply | Threaded
Open this post in threaded view
|

Re: Lua code formatter

Jon Chesterfield
In reply to this post by Eliott Dumeix

> Just to show my lua code formatter written in python3.

That is a serious affront. Surely Lua itself is perfectly adequate for the task?

Is there an implementation of a lua code formatter in lua? I'd prefer to use one, but if there isn't, this one may be worth a try.
Reply | Threaded
Open this post in threaded view
|

Re: Lua code formatter

Dirk Laurie-2
2018-06-06 14:13 GMT+02:00 Jon Chesterfield <[hidden email]>:
>
>> > Just to show my lua code formatter written in python3.
>>
>> That is a serious affront. Surely Lua itself is perfectly adequate for the
>> task?
>
>
> Is there an implementation of a lua code formatter in lua?

If no other (which I seriously doubt), you could try my very first Lua
program, preserved on the final two pages of

https://github.com/dlaurie/lua-notes/blob/master/luatex-primer.pdf.

Reply | Threaded
Open this post in threaded view
|

Re: Lua code formatter

dyngeccetor8
In reply to this post by Jon Chesterfield
On 06/06/2018 03:13 PM, Jon Chesterfield wrote:
>>> Just to show my lua code formatter written in python3.
>>
>> That is a serious affront. Surely Lua itself is perfectly adequate for the
>> task?
>>
>
> Is there an implementation of a lua code formatter in lua? I'd prefer to
> use one, but if there isn't, this one may be worth a try.
>

I'm author of https://github.com/martin-eden/lua_code_formatter .
It's written in Lua and intended to reformat files with Lua code.

Simplest way to try it is:

  $ sudo luarocks install lcf
  $ lua.reformat

-- Martin

Reply | Threaded
Open this post in threaded view
|

Re: Lua code formatter

Oliver Jan Krylow

>
> I'm author of https://github.com/martin-eden/lua_code_formatter .
> It's written in Lua and intended to reformat files with Lua code.

I can vouch for this one.
It works well enough that I have integrated it into my editor.
Be aware, targets 5.3 only.