Skip to content
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

build.lua has no access to plugin dir #1368

Open
bugabinga opened this issue Mar 20, 2024 · 0 comments
Open

build.lua has no access to plugin dir #1368

bugabinga opened this issue Mar 20, 2024 · 0 comments

Comments

@bugabinga
Copy link

Loader.source(build_file)

From reading the code, I think this line has the issue, that, if a plugin specifies a build.lua file, it gets sourced into the current neovim lua runtime, thereby sharing its CWD.
The build file typically wants a CWD equal to plugin dir.
That is already the case if the build property is a script or a function (via the plugin spec parameter).

Furthermore, if the build is a lua file or a function, it does not seem to run async.

build(self.plugin)

If this is correct, what would I need to change to run build.lua in plugin.dir and make it and the function variant async?

  • coroutines?
  • vim.uv.new_thread?
  • spawn new nvim --headless -c ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant