fix: nightly(0.11) (#104)
* chore: fix minimal_init, load default plugins correctly * refactor(ts): make it work on nightly * chore: get nightly back in ci * fix(tests): some how i now i need to run vim.treesitter.start() to make it work * feat(ts): check if parser is found * chore: use --clean instead --noplugin * refactor(tests): use auto commands instead of putting it in each test * chore: show the diff of the doc
This commit is contained in:
parent
c0b2834652
commit
77754fe362
7 changed files with 39 additions and 26 deletions
|
|
@ -69,6 +69,7 @@ end
|
|||
---@class gopher.TestUtilsSetup
|
||||
---@field tmp string
|
||||
---@field fixtures gopher.TestUtilsFixtures
|
||||
---@field bufnr number
|
||||
|
||||
---@param fixture string
|
||||
---@param child MiniTest.child
|
||||
|
|
@ -81,12 +82,14 @@ function testutils.setup_test(fixture, child, pos)
|
|||
testutils.writefile(tmp, fixtures.input)
|
||||
child.cmd("silent edit " .. tmp)
|
||||
|
||||
local bufnr = child.fn.bufnr(tmp)
|
||||
if pos then
|
||||
child.fn.setpos(".", { child.fn.bufnr(tmp), unpack(pos) })
|
||||
child.fn.setpos(".", { bufnr, unpack(pos) })
|
||||
end
|
||||
|
||||
return {
|
||||
tmp = tmp,
|
||||
bufnr = bufnr,
|
||||
fixtures = fixtures,
|
||||
}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue