From 20e06a6fd2f050add5ad4754ed3aff188800f16c Mon Sep 17 00:00:00 2001 From: Oleksandr Smirnov Date: Fri, 21 Mar 2025 21:32:24 +0200 Subject: [PATCH] refactor(plugin): use vim.schedule --- plugin/gopher.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/gopher.lua b/plugin/gopher.lua index a813bb4..ec05e86 100644 --- a/plugin/gopher.lua +++ b/plugin/gopher.lua @@ -5,7 +5,7 @@ vim.g.gopher_loaded = 1 --- NOTE: runs in defer since this file before gopher.config --- I'm not sure if this is the best to do this -vim.defer_fn(function() +vim.schedule(function() if require("gopher.config").should_setup_commands() then vim.api.nvim_create_user_command("GopherLog", function() vim.cmd("tabnew " .. require("gopher._utils.log").get_outfile()) @@ -76,4 +76,4 @@ vim.defer_fn(function() require("gopher").generate(opts.fargs or "") end, { nargs = "?" }) end -end, 0) +end)