aboutsummaryrefslogtreecommitdiff
path: root/test/functional/treesitter
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-11-14 13:10:32 +0100
committerGitHub <noreply@github.com>2024-11-14 13:10:32 +0100
commit7d771c3eeef5b4dca9ebc5ed6f7ca03f2b26b6bc (patch)
treefc5908c85c0cc6affc3bc325cd75f6efaeea95d8 /test/functional/treesitter
parent40dee8a2dcba996badaa6182eb34fde1694f92a3 (diff)
parente61228a214ebda9845db9462dad0a8c362d3963f (diff)
downloadrneovim-7d771c3eeef5b4dca9ebc5ed6f7ca03f2b26b6bc.tar.gz
rneovim-7d771c3eeef5b4dca9ebc5ed6f7ca03f2b26b6bc.tar.bz2
rneovim-7d771c3eeef5b4dca9ebc5ed6f7ca03f2b26b6bc.zip
Merge pull request #31168 from bfredl/noattach
fix(tests): needing two calls to setup a screen is cringe
Diffstat (limited to 'test/functional/treesitter')
-rw-r--r--test/functional/treesitter/fold_spec.lua4
-rw-r--r--test/functional/treesitter/highlight_spec.lua6
2 files changed, 0 insertions, 10 deletions
diff --git a/test/functional/treesitter/fold_spec.lua b/test/functional/treesitter/fold_spec.lua
index 24b085920c..e38e58ff92 100644
--- a/test/functional/treesitter/fold_spec.lua
+++ b/test/functional/treesitter/fold_spec.lua
@@ -442,7 +442,6 @@ t3]])
it('updates folds in all windows', function()
local screen = Screen.new(60, 48)
- screen:attach()
screen:set_default_attr_ids({
[1] = { background = Screen.colors.Grey, foreground = Screen.colors.DarkBlue },
[2] = { bold = true, foreground = Screen.colors.Blue1 },
@@ -603,7 +602,6 @@ t3]])
it("doesn't open folds in diff mode", function()
local screen = Screen.new(60, 36)
- screen:attach()
parse('c')
command(
@@ -660,7 +658,6 @@ t3]])
it('does not extend closed fold with `o`/`O`', function()
local screen = Screen.new(60, 24)
- screen:attach()
insert(test_text)
parse('c')
@@ -727,7 +724,6 @@ t3]])
[3] = { foreground = Screen.colors.Blue1, bold = true },
[4] = { bold = true },
})
- screen:attach()
insert([[
# h1
diff --git a/test/functional/treesitter/highlight_spec.lua b/test/functional/treesitter/highlight_spec.lua
index b5a6cb5c17..5c6be869c6 100644
--- a/test/functional/treesitter/highlight_spec.lua
+++ b/test/functional/treesitter/highlight_spec.lua
@@ -161,7 +161,6 @@ describe('treesitter highlighting (C)', function()
before_each(function()
clear()
screen = Screen.new(65, 18)
- screen:attach()
screen:set_default_attr_ids {
[1] = { bold = true, foreground = Screen.colors.Blue1 },
[2] = { foreground = Screen.colors.Blue1 },
@@ -848,7 +847,6 @@ describe('treesitter highlighting (lua)', function()
before_each(function()
clear()
screen = Screen.new(65, 18)
- screen:attach()
screen:set_default_attr_ids {
[1] = { bold = true, foreground = Screen.colors.Blue },
[2] = { foreground = Screen.colors.DarkCyan },
@@ -887,7 +885,6 @@ describe('treesitter highlighting (help)', function()
before_each(function()
clear()
screen = Screen.new(40, 6)
- screen:attach()
screen:set_default_attr_ids {
[1] = { foreground = Screen.colors.Blue1 },
[2] = { bold = true, foreground = Screen.colors.Blue1 },
@@ -1025,7 +1022,6 @@ describe('treesitter highlighting (nested injections)', function()
before_each(function()
clear()
screen = Screen.new(80, 7)
- screen:attach()
screen:set_default_attr_ids {
[1] = { foreground = Screen.colors.SlateBlue },
[2] = { bold = true, foreground = Screen.colors.Brown },
@@ -1093,7 +1089,6 @@ describe('treesitter highlighting (markdown)', function()
before_each(function()
clear()
screen = Screen.new(40, 6)
- screen:attach()
exec_lua(function()
vim.bo.filetype = 'markdown'
vim.treesitter.start()
@@ -1161,7 +1156,6 @@ it('starting and stopping treesitter highlight in init.lua works #29541', functi
eq('', api.nvim_get_vvar('errmsg'))
local screen = Screen.new(65, 18)
- screen:attach()
screen:set_default_attr_ids {
[1] = { bold = true, foreground = Screen.colors.Blue1 },
[2] = { foreground = Screen.colors.Blue1 },