From 14bc188b5eeeee9696d61f0cdd7384e946adccb0 Mon Sep 17 00:00:00 2001 From: Oula Kuuva Date: Tue, 21 Mar 2023 08:36:08 +0200 Subject: [PATCH] style: update stylua.toml and .editorconfig Made stylua.toml use two spaces as indentation since that seems to be the most common convention in lua. Rest of the settings are kept in Stylua defaults but made explicit. Also updated .editorconfig to match config in stylua.toml. --- .editorconfig | 5 ++--- stylua.toml | 9 +++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index a7b9909..c128223 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,14 +4,13 @@ root = true - [*] end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -indent_style = tab -indent_size = 4 +indent_style = space +indent_size = 2 [*.txt] indent_style = tab diff --git a/stylua.toml b/stylua.toml index d0ebf61..fb3dcf8 100644 --- a/stylua.toml +++ b/stylua.toml @@ -1,5 +1,10 @@ +column_width = 120 line_endings = "Unix" -indent_type = "Tabs" -indent_width = 4 +indent_type = "Spaces" +indent_width = 2 quote_style = "AutoPreferDouble" call_parentheses = "Always" +collapse_simple_statement = "Never" + +[sort_requires] +enabled = false