From f262e7d56d37625613c5de0df5a933cccacf13c5 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Mon, 31 Jan 2022 20:34:53 +0100 Subject: [PATCH] chore: format with stylua 0.12.0 (#1730) --- .stylua.toml | 2 +- lua/tests/automated/entry_display_spec.lua | 32 ++++++++++--------- .../automated/pickers/find_files_spec.lua | 10 +++--- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.stylua.toml b/.stylua.toml index df96b7b..ecb6dca 100644 --- a/.stylua.toml +++ b/.stylua.toml @@ -3,4 +3,4 @@ line_endings = "Unix" indent_type = "Spaces" indent_width = 2 quote_style = "AutoPreferDouble" -no_call_parentheses = true +call_parentheses = "None" diff --git a/lua/tests/automated/entry_display_spec.lua b/lua/tests/automated/entry_display_spec.lua index a09ccae..b57e3a3 100644 --- a/lua/tests/automated/entry_display_spec.lua +++ b/lua/tests/automated/entry_display_spec.lua @@ -2,21 +2,23 @@ local entry_display = require "telescope.pickers.entry_display" describe("truncate", function() for _, ambiwidth in ipairs { "single", "double" } do - for _, case in ipairs { - { args = { "abcde", 6 }, expected = { single = "abcde", double = "abcde" } }, - { args = { "abcde", 5 }, expected = { single = "abcde", double = "abcde" } }, - { args = { "abcde", 4 }, expected = { single = "abc…", double = "ab…" } }, - { args = { "アイウエオ", 11 }, expected = { single = "アイウエオ", double = "アイウエオ" } }, - { args = { "アイウエオ", 10 }, expected = { single = "アイウエオ", double = "アイウエオ" } }, - { args = { "アイウエオ", 9 }, expected = { single = "アイウエ…", double = "アイウ…" } }, - { args = { "アイウエオ", 8 }, expected = { single = "アイウ…", double = "アイウ…" } }, - { args = { "├─┤", 7 }, expected = { single = "├─┤", double = "├─┤" } }, - { args = { "├─┤", 6 }, expected = { single = "├─┤", double = "├─┤" } }, - { args = { "├─┤", 5 }, expected = { single = "├─┤", double = "├…" } }, - { args = { "├─┤", 4 }, expected = { single = "├─┤", double = "├…" } }, - { args = { "├─┤", 3 }, expected = { single = "├─┤", double = "…" } }, - { args = { "├─┤", 2 }, expected = { single = "├…", double = "…" } }, - } do + for _, case in + ipairs { + { args = { "abcde", 6 }, expected = { single = "abcde", double = "abcde" } }, + { args = { "abcde", 5 }, expected = { single = "abcde", double = "abcde" } }, + { args = { "abcde", 4 }, expected = { single = "abc…", double = "ab…" } }, + { args = { "アイウエオ", 11 }, expected = { single = "アイウエオ", double = "アイウエオ" } }, + { args = { "アイウエオ", 10 }, expected = { single = "アイウエオ", double = "アイウエオ" } }, + { args = { "アイウエオ", 9 }, expected = { single = "アイウエ…", double = "アイウ…" } }, + { args = { "アイウエオ", 8 }, expected = { single = "アイウ…", double = "アイウ…" } }, + { args = { "├─┤", 7 }, expected = { single = "├─┤", double = "├─┤" } }, + { args = { "├─┤", 6 }, expected = { single = "├─┤", double = "├─┤" } }, + { args = { "├─┤", 5 }, expected = { single = "├─┤", double = "├…" } }, + { args = { "├─┤", 4 }, expected = { single = "├─┤", double = "├…" } }, + { args = { "├─┤", 3 }, expected = { single = "├─┤", double = "…" } }, + { args = { "├─┤", 2 }, expected = { single = "├…", double = "…" } }, + } + do local msg = ("can truncate: ambiwidth = %s, [%s, %d] -> %s"):format( ambiwidth, case.args[1], diff --git a/lua/tests/automated/pickers/find_files_spec.lua b/lua/tests/automated/pickers/find_files_spec.lua index e9094cb..f5ca05d 100644 --- a/lua/tests/automated/pickers/find_files_spec.lua +++ b/lua/tests/automated/pickers/find_files_spec.lua @@ -15,10 +15,12 @@ describe("builtin.find_files", function() tester.run_file "find_files__with_ctrl_n" end) - for _, configuration in ipairs { - { sorting_strategy = "descending" }, - { sorting_strategy = "ascending" }, - } do + for _, configuration in + ipairs { + { sorting_strategy = "descending" }, + { sorting_strategy = "ascending" }, + } + do it("should not display devicons when disabled: " .. disp(configuration), function() tester.run_string(string.format( [[