8000 feat: simply re-issue the event for event cond load plugins by epheien · Pull Request #29 · lewis6991/pckr.nvim · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: simply re-issue the event for event cond load plugins #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions lua/pckr/loader/event.lua
836A
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@
--- @return fun(_: fun())
return function(events, pattern)
return function(loader)
local done = false
vim.api.nvim_create_autocmd(events, {
pattern = pattern,
>
desc = 'pckr.nvim lazy load',
callback = function()
callback = function(ev)
if done then
return true
end
-- HACK: work-around for https://github.com/neovim/neovim/issues/25526
done = true
loader()
-- TODO(lewis6991): should we re-issue the event? (#1163)
-- vim.api.nvim_exec_autocmds(event, { modeline = false })
vim.api.nvim_exec_autocmds(ev.event, {
buffer = ev.buf,
group = ev.group,
modeline = false,
data = ev.data,
})
end,
})
end
Expand Down
Loading
0