From 90ca7b1f7fee38450540e2fbff1a03f5bffdfbff Mon Sep 17 00:00:00 2001 From: Brian Forsberg Date: Mon, 26 Feb 2024 13:59:36 -0600 Subject: [PATCH] Configure stylua to collapse simple inline lua functions This config prevents stylua from changing one-liners like this: vim.keymap.set('n', '', function() harpoon:list():select(1) end) to this: vim.keymap.set('n', '', function() harpoon:list():select(1) end) --- .stylua.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/.stylua.toml b/.stylua.toml index 139e9397..aa6f4b6a 100644 --- a/.stylua.toml +++ b/.stylua.toml @@ -4,3 +4,4 @@ indent_type = "Spaces" indent_width = 2 quote_style = "AutoPreferSingle" call_parentheses = "None" +collapse_simple_statement = "FunctionOnly"