Skip to content

Commit

Permalink
Format with stylua
Browse files Browse the repository at this point in the history
  • Loading branch information
L3MON4D3 authored and github-actions[bot] committed Dec 2, 2024
1 parent 9827beb commit 4400d25
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion tests/integration/choice_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/dynamic_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ext_opts_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/extras_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/fmt_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/function_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/jump_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/multisnippet_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/parser_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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"'

Expand Down Expand Up @@ -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"'
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/postfix_snippet_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/restore_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/select_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/selection_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/session_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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 },
Expand Down Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/simple_nodes_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/snippet_basics_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/snippet_ft_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
10 changes: 6 additions & 4 deletions tests/integration/source_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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()
Expand Down Expand Up @@ -81,7 +81,9 @@ describe("loaders:", function()
{2:-- INSERT --} |]],
})
-- immediately clear error-message.
feed("<esc><cmd>lua require('luasnip.extras.snip_location').jump_to_active_snippet()<Cr><Cr>")
feed(
"<esc><cmd>lua require('luasnip.extras.snip_location').jump_to_active_snippet()<Cr><Cr>"
)
-- remove error-message for easier version-compatibility (it was changed
-- somewhere between 0.9 and master at the time of writing).
screen:expect({
Expand All @@ -93,7 +95,7 @@ describe("loaders:", function()
"expands? jumps? $1 $2 !" |
] |
}, |
|]]
|]],
})
end)

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/treesitter_postfix_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -19,7 +19,7 @@ describe("treesitter-postfix", function()
})
end
before_each(function()
setup({setup_parsers = true})
setup({ setup_parsers = true })
end)

after_each(function()
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/snippetProxy_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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 },
Expand Down

0 comments on commit 4400d25

Please sign in to comment.