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

[Feature] Rocks install API for install_args #443

Open
mrcjkb opened this issue Jul 1, 2024 · 1 comment
Open

[Feature] Rocks install API for install_args #443

mrcjkb opened this issue Jul 1, 2024 · 1 comment

Comments

@mrcjkb
Copy link
Member

mrcjkb commented Jul 1, 2024

For instance, allowing :Rocks install something opt=true ft=markdown and feeding that directly into the toml.

We already do that1 😉

What could be tricky is coming up with a good API for args that are lists:

:Rocks install {rock} opt=true install_args=["GIT2_DIR=/some/path","foo","bar"]

or

:Rocks install {rock} opt=true install_args=[GIT2_DIR=/some/path,foo,bar]

or, assuming any args that rocks.nvim can't parse are install_args:

:Rocks install {rock} opt=true GIT2_DIR=/some/path

The last one is more concise, but also more brittle: If someone passes in ft=markdown, it would be added to the install_args as long as rocks-lazy.nvim doesn't register an arg parser.

should we instead support an [env] section in the toml, which would modify vim.env?

Luarocks won't pick up GIT2_DIR from an environment variable. It has to be passed as an arg to install.

Since this is more of an edge case, I think we don't need to prioritise passing install_args via :Rocks install initially.

Originally posted by @mrcjkb in #439 (comment)

Footnotes

  1. As long as the extensions know how to parse args that rocks.nvim doesn't know about.
    So far, only rocks.nvim and rocks-git.nvim know how to parse args.

@mrcjkb
Copy link
Member Author

mrcjkb commented Jul 1, 2024

Since this ought to be an edge case, we may not want to support this, as it adds quite a bit of complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant