refactor(tests): use auto commands instead of putting it in each test

This commit is contained in:
Oleksandr Smirnov 2025-03-23 18:49:49 +02:00
parent 9d734f114d
commit c0297ac1d6
No known key found for this signature in database
3 changed files with 9 additions and 5 deletions

View file

@ -52,3 +52,12 @@ if #vim.api.nvim_list_uis() == 0 then
},
}
end
-- needed for tests, i dont know the reason why, but on start
-- vim is not able to use treesitter for go by default
vim.api.nvim_create_autocmd("FileType", {
pattern = "go",
callback = function(args)
vim.treesitter.start(args.buf, "go")
end,
})