From 4400d2547bd207bb489307d57613b79d5d33ed08 Mon Sep 17 00:00:00 2001 From: L3MON4D3 Date: Mon, 2 Dec 2024 17:40:48 +0000 Subject: [PATCH] Format with stylua --- tests/integration/choice_spec.lua | 2 +- tests/integration/dynamic_spec.lua | 2 +- tests/integration/ext_opts_spec.lua | 2 +- tests/integration/extras_spec.lua | 4 ++-- tests/integration/fmt_spec.lua | 2 +- tests/integration/function_spec.lua | 2 +- tests/integration/jump_spec.lua | 2 +- tests/integration/multisnippet_spec.lua | 2 +- tests/integration/parser_spec.lua | 6 +++--- tests/integration/postfix_snippet_spec.lua | 2 +- tests/integration/restore_spec.lua | 2 +- tests/integration/select_spec.lua | 2 +- tests/integration/selection_spec.lua | 2 +- tests/integration/session_spec.lua | 6 +++--- tests/integration/simple_nodes_spec.lua | 2 +- tests/integration/snippet_basics_spec.lua | 4 ++-- tests/integration/snippet_ft_spec.lua | 2 +- tests/integration/source_spec.lua | 10 ++++++---- tests/integration/treesitter_postfix_spec.lua | 4 ++-- tests/unit/snippetProxy_spec.lua | 4 ++-- 20 files changed, 33 insertions(+), 31 deletions(-) diff --git a/tests/integration/choice_spec.lua b/tests/integration/choice_spec.lua index 186371eb..22078e6e 100644 --- a/tests/integration/choice_spec.lua +++ b/tests/integration/choice_spec.lua @@ -9,7 +9,7 @@ describe("ChoiceNode", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/dynamic_spec.lua b/tests/integration/dynamic_spec.lua index 7b3be1c3..ba074531 100644 --- a/tests/integration/dynamic_spec.lua +++ b/tests/integration/dynamic_spec.lua @@ -9,7 +9,7 @@ describe("DynamicNode", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/ext_opts_spec.lua b/tests/integration/ext_opts_spec.lua index 9be17e3d..2928c145 100644 --- a/tests/integration/ext_opts_spec.lua +++ b/tests/integration/ext_opts_spec.lua @@ -17,7 +17,7 @@ describe("snippets_basic", function() hi Red ctermfg=Red guifg=Red ]]) - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue1 }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/extras_spec.lua b/tests/integration/extras_spec.lua index 39cb01e8..9281b011 100644 --- a/tests/integration/extras_spec.lua +++ b/tests/integration/extras_spec.lua @@ -9,7 +9,7 @@ describe("Extra-nodes:", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, @@ -114,7 +114,7 @@ describe("Extra-nodes:", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,5) + screen = ls_helpers.new_screen(50, 5) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/fmt_spec.lua b/tests/integration/fmt_spec.lua index 626ad8e6..5c00649f 100644 --- a/tests/integration/fmt_spec.lua +++ b/tests/integration/fmt_spec.lua @@ -8,7 +8,7 @@ describe("Fmt", function() before_each(function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/function_spec.lua b/tests/integration/function_spec.lua index 2426b3e8..c9e66998 100644 --- a/tests/integration/function_spec.lua +++ b/tests/integration/function_spec.lua @@ -9,7 +9,7 @@ describe("FunctionNode", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/jump_spec.lua b/tests/integration/jump_spec.lua index 8709516c..fc4761d3 100644 --- a/tests/integration/jump_spec.lua +++ b/tests/integration/jump_spec.lua @@ -9,7 +9,7 @@ describe("Jumping", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,5) + screen = ls_helpers.new_screen(50, 5) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/multisnippet_spec.lua b/tests/integration/multisnippet_spec.lua index 914343e4..c789da40 100644 --- a/tests/integration/multisnippet_spec.lua +++ b/tests/integration/multisnippet_spec.lua @@ -18,7 +18,7 @@ describe("multisnippets", function() end ]]) - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/parser_spec.lua b/tests/integration/parser_spec.lua index 8814656c..8952145f 100644 --- a/tests/integration/parser_spec.lua +++ b/tests/integration/parser_spec.lua @@ -10,7 +10,7 @@ describe("Parser", function() ls_helpers.clear() ls_helpers.session_setup_luasnip(...) - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, @@ -228,7 +228,7 @@ describe("Parser", function() end) it("just inserts the variable if jsregexp is not available.", function() - setup({prevent_jsregexp=true}) + setup({ prevent_jsregexp = true }) local snip = '"a${TM_LINE_INDEX/(.*)/asdf $1 asdf/g}a"' @@ -260,7 +260,7 @@ describe("Parser", function() }) end) it("copies tabstop if jsregexp is not available.", function() - setup({prevent_jsregexp=true}) + setup({ prevent_jsregexp = true }) -- ls_helpers.session_setup_luasnip() local snip = '"$1 a ${1/(.*)/asdf $1 asdf/} a"' diff --git a/tests/integration/postfix_snippet_spec.lua b/tests/integration/postfix_snippet_spec.lua index 184edf6f..2b2888bb 100644 --- a/tests/integration/postfix_snippet_spec.lua +++ b/tests/integration/postfix_snippet_spec.lua @@ -10,7 +10,7 @@ describe("postfix snippets", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/restore_spec.lua b/tests/integration/restore_spec.lua index 3fd251f3..5a8f31c1 100644 --- a/tests/integration/restore_spec.lua +++ b/tests/integration/restore_spec.lua @@ -9,7 +9,7 @@ describe("RestoreNode", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/select_spec.lua b/tests/integration/select_spec.lua index 59325ab4..9511b576 100644 --- a/tests/integration/select_spec.lua +++ b/tests/integration/select_spec.lua @@ -10,7 +10,7 @@ describe("Selection", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,7) + screen = ls_helpers.new_screen(50, 7) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/selection_spec.lua b/tests/integration/selection_spec.lua index 142ae65e..6f25791c 100644 --- a/tests/integration/selection_spec.lua +++ b/tests/integration/selection_spec.lua @@ -9,7 +9,7 @@ describe("selection", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/session_spec.lua b/tests/integration/session_spec.lua index c75a1b38..81d21ea7 100644 --- a/tests/integration/session_spec.lua +++ b/tests/integration/session_spec.lua @@ -134,7 +134,7 @@ describe("session", function() }) ]]) - screen = ls_helpers.new_screen(50,30) + screen = ls_helpers.new_screen(50, 30) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, @@ -1916,7 +1916,7 @@ describe("session", function() }) ]]) screen:detach() - screen = ls_helpers.new_screen(50,4) + screen = ls_helpers.new_screen(50, 4) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, @@ -2051,7 +2051,7 @@ describe("session", function() function() screen:detach() -- make screen smaller :) - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/simple_nodes_spec.lua b/tests/integration/simple_nodes_spec.lua index af327c31..7b074f00 100644 --- a/tests/integration/simple_nodes_spec.lua +++ b/tests/integration/simple_nodes_spec.lua @@ -9,7 +9,7 @@ describe("Simple Nodes", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/snippet_basics_spec.lua b/tests/integration/snippet_basics_spec.lua index 9b3fcb53..fbd53937 100644 --- a/tests/integration/snippet_basics_spec.lua +++ b/tests/integration/snippet_basics_spec.lua @@ -10,7 +10,7 @@ describe("snippets_basic", function() ls_helpers.clear() ls_helpers.session_setup_luasnip({ setup_parsers = true }) - screen = ls_helpers.new_screen(50,3) + screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, @@ -743,7 +743,7 @@ describe("snippets_basic", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,40) + screen = ls_helpers.new_screen(50, 40) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue1 }, [1] = { bold = true, foreground = Screen.colors.Brown }, diff --git a/tests/integration/snippet_ft_spec.lua b/tests/integration/snippet_ft_spec.lua index cd85899e..bb0cf3dd 100644 --- a/tests/integration/snippet_ft_spec.lua +++ b/tests/integration/snippet_ft_spec.lua @@ -10,7 +10,7 @@ describe("snippet-ft tooling", function() ls_helpers.clear() ls_helpers.session_setup_luasnip() - screen = ls_helpers.new_screen(50,30) + screen = ls_helpers.new_screen(50, 30) screen:set_default_attr_ids({ [0] = { bold = false, foreground = Screen.colors.Gray0 }, [1] = { foreground = Screen.colors.Cyan1 }, diff --git a/tests/integration/source_spec.lua b/tests/integration/source_spec.lua index d6da3611..546c5509 100644 --- a/tests/integration/source_spec.lua +++ b/tests/integration/source_spec.lua @@ -11,7 +11,7 @@ describe("loaders:", function() ls_helpers.clear() ls_helpers.session_setup_luasnip(...) - screen = ls_helpers.new_screen(50,8) + screen = ls_helpers.new_screen(50, 8) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, @@ -20,7 +20,7 @@ describe("loaders:", function() }) end before_each(function() - setup({no_snip_globals = true}) + setup({ no_snip_globals = true }) end) after_each(function() @@ -81,7 +81,9 @@ describe("loaders:", function() {2:-- INSERT --} |]], }) -- immediately clear error-message. - feed("lua require('luasnip.extras.snip_location').jump_to_active_snippet()") + feed( + "lua require('luasnip.extras.snip_location').jump_to_active_snippet()" + ) -- remove error-message for easier version-compatibility (it was changed -- somewhere between 0.9 and master at the time of writing). screen:expect({ @@ -93,7 +95,7 @@ describe("loaders:", function() "expands? jumps? $1 $2 !" | ] | }, | - |]] + |]], }) end) diff --git a/tests/integration/treesitter_postfix_spec.lua b/tests/integration/treesitter_postfix_spec.lua index 8e5da8c2..3d3d6f77 100644 --- a/tests/integration/treesitter_postfix_spec.lua +++ b/tests/integration/treesitter_postfix_spec.lua @@ -10,7 +10,7 @@ describe("treesitter-postfix", function() ls_helpers.clear() ls_helpers.session_setup_luasnip(...) - screen = ls_helpers.new_screen(50,8) + screen = ls_helpers.new_screen(50, 8) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, @@ -19,7 +19,7 @@ describe("treesitter-postfix", function() }) end before_each(function() - setup({setup_parsers = true}) + setup({ setup_parsers = true }) end) after_each(function() diff --git a/tests/unit/snippetProxy_spec.lua b/tests/unit/snippetProxy_spec.lua index 65f5a73e..95a7aa41 100644 --- a/tests/unit/snippetProxy_spec.lua +++ b/tests/unit/snippetProxy_spec.lua @@ -53,7 +53,7 @@ describe("snippetProxy", function() end) it("expands correctly", function() - local screen = ls_helpers.new_screen(50,3) + local screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown }, @@ -73,7 +73,7 @@ describe("snippetProxy", function() -- one integration test. it("works for triggered expansion", function() - local screen = ls_helpers.new_screen(50,3) + local screen = ls_helpers.new_screen(50, 3) screen:set_default_attr_ids({ [0] = { bold = true, foreground = Screen.colors.Blue }, [1] = { bold = true, foreground = Screen.colors.Brown },