diff mbox series

editorconfig: Add settings for *.lua files

Message ID 20230602131848.70184-1-christian.storm@siemens.com
State Accepted
Headers show
Series editorconfig: Add settings for *.lua files | expand

Commit Message

Storm, Christian June 2, 2023, 1:18 p.m. UTC
Add editorconfig configuration for *.lua files following
the defaults of https://github.com/JohnnyMorganz/StyLua

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 .editorconfig | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Storm, Christian June 2, 2023, 1:31 p.m. UTC | #1
> Add editorconfig configuration for *.lua files following
> the defaults of https://github.com/JohnnyMorganz/StyLua

Since stylua is a widely accepted and IMO very good Lua formatter,
it would make sense to apply it to SWUpdate's Lua code as well.
If accepted, I'd like to (re-)format the Lua code with it and
would send according patches...

Kind regards,
   Christian
Stefano Babic June 14, 2023, 1:09 p.m. UTC | #2
On 02.06.23 15:31, 'Christian Storm' via swupdate wrote:
>> Add editorconfig configuration for *.lua files following
>> the defaults of https://github.com/JohnnyMorganz/StyLua
> 
> Since stylua is a widely accepted and IMO very good Lua formatter,

Thanks for tip, I checked myself and I find this is a good idea.
> it would make sense to apply it to SWUpdate's Lua code as well.
> If accepted, I'd like to (re-)format the Lua code with it and
> would send according patches...
> 

Please do it.

Best regards,
Stefano

> Kind regards,
>     Christian
>
diff mbox series

Patch

diff --git a/.editorconfig b/.editorconfig
index 8db64401..7443b7c3 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -25,3 +25,8 @@  tab_width = 8
 [*.cfg]
 indent_style = tab
 indent_size = 8
+
+# Defaults of https://github.com/JohnnyMorganz/StyLua
+[*.lua]
+indent_size = 4
+indent_style = space