wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.82k stars 266 forks source link

(feat)luarocks: make rocks path configurable; fixes #672 #957

Open msva opened 2 years ago

msva commented 2 years ago

Well, actually, it makes all paths configurable (just in case), but main reason was to make rocks path configurable, as I have ~/.cache on tmpfs (and it is not persistent across reboots. Moreover, actually, cache_dir by itself, wherever it placed, is not guaranteed to be persistent). So, it was impossible for me to properly use rocks functionality with hardcoded rocks path...

wbthomason commented 2 years ago

Also sorry for taking so long to get to this! I haven't had much time/energy for packer lately.

msva commented 2 years ago

Well, I'll try to invent something here, but it wouldn't be so easy: most parameters requires values of previously-defined value.

Current behaviour is just to check if it is defined in config, and use defined value if it is, and some default value if don't. And, as it is executed line-by-line, if some "early" parameter was defined in config, it will affect all next-defined things.

And if we'll just use a table, this magic won't work, as we cant call neither other fields in the table of "defaults", nor values from not-yet-merged resulting table.

So, I'll still need to check values from _config, or invent some other way.

// by the way, I found that cache_path here is never used in anu way except being a part of rocks_path, so I removed it as useless.

Hope, you'll not object that change.

msva commented 2 years ago

@wbthomason ping? (direct ping in case you're overwhelmed by notifications)