From aab54ae5e1651cc8221638376969af58408d7218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Tue, 26 Jul 2022 08:40:26 +0100 Subject: [PATCH] fix(lib): schedule notify See #74 --- lua/neotest/lib/init.lua | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lua/neotest/lib/init.lua b/lua/neotest/lib/init.lua index 7fe8ce82..c4deb254 100644 --- a/lua/neotest/lib/init.lua +++ b/lua/neotest/lib/init.lua @@ -21,14 +21,16 @@ M.func_util = require("neotest.lib.func_util") M.treesitter = require("neotest.lib.treesitter") M.notify = function(msg, level, opts) - return vim.notify( - msg, - level, - vim.tbl_extend("keep", opts or {}, { - title = "Neotest", - icon = "ﭧ", - }) - ) + vim.schedule(function() + return vim.notify( + msg, + level, + vim.tbl_extend("keep", opts or {}, { + title = "Neotest", + icon = "ﭧ", + }) + ) + end) end M.vim_test = require("neotest.lib.vim_test")