fix(plugin): pass plugin as arg to config/init/build

This commit is contained in:
Folke Lemaitre 2022-12-26 22:59:02 +01:00
parent de383740a2
commit b6ebed5888
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 7 additions and 3 deletions

View file

@ -20,7 +20,7 @@ M.build = {
local cmd = vim.api.nvim_parse_cmd(build:sub(2), {})
self.output = vim.api.nvim_cmd(cmd, { output = true })
elseif type(build) == "function" then
build()
build(self.plugin)
else
local shell = vim.env.SHELL or vim.o.shell
local shell_args = shell:find("cmd.exe", 1, true) and "/c" or "-c"