refactor(plugin): use vim.schedule
This commit is contained in:
parent
326ea461a6
commit
20e06a6fd2
1 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ vim.g.gopher_loaded = 1
|
||||||
|
|
||||||
--- NOTE: runs in defer since this file before gopher.config
|
--- NOTE: runs in defer since this file before gopher.config
|
||||||
--- I'm not sure if this is the best to do this
|
--- 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
|
if require("gopher.config").should_setup_commands() then
|
||||||
vim.api.nvim_create_user_command("GopherLog", function()
|
vim.api.nvim_create_user_command("GopherLog", function()
|
||||||
vim.cmd("tabnew " .. require("gopher._utils.log").get_outfile())
|
vim.cmd("tabnew " .. require("gopher._utils.log").get_outfile())
|
||||||
|
|
@ -76,4 +76,4 @@ vim.defer_fn(function()
|
||||||
require("gopher").generate(opts.fargs or "")
|
require("gopher").generate(opts.fargs or "")
|
||||||
end, { nargs = "?" })
|
end, { nargs = "?" })
|
||||||
end
|
end
|
||||||
end, 0)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue