lunarvim.org
lunarvim.org copied to clipboard
Adding Dependencies to Installation Docs
closes LunarVim#2028 There is probably a lot more to be added here but this is at least a start.
xclip
applies to Linux, maybe not macOS and certainly not Windows.
This is also missing ripgrep, for what it's worth.
Sidenote: when the installer asks you for rust dependencies, it will install fd-find and ripgrep for you
@kylo252 The installer uses cargo
to install ripgrep and fd-find, so maybe it should go in there and rg
and fd
should sub-items of it: https://github.com/LunarVim/LunarVim/blob/rolling/utils/installer/install.sh#L242-L251
Sidenote: when the installer asks you for rust dependencies, it will install fd-find and ripgrep for you
I'm pretty sure it doesn't, as it didn't ask me when I installed the latest version, which lead to the referenced Issue.
@kylo252 The installer uses
cargo
to install ripgrep and fd-find
The thing is that you can install these through your package manager or something and never have to deal with cargo
🤷
I'm pretty sure it doesn't, as it didn't ask me when I installed the latest version, which lead to the referenced Issue.
Maybe you missed it, since it's optional.
Maybe you missed it, since it's optional.
Maybe I did, but the installer never asked me so I don't even now where I should've been looking.
Maybe I did, but the isntaller never asked me so I don't even now where I should've been looking.
Which system did you say you were using? I know that Debian has some other fd
by default.
@kylo252 The installer uses
cargo
to install ripgrep and fd-findThe thing is that you can install these through your package manager or something and never have to deal with
cargo
shrug
While it may be optional, I think it's the most direct way to getting them installed. Also distros may have out of date versions of the software or like in Ubuntu, doesn't install the binary as fd
.
There are also cases, like on macOS, where the package manager is unreliable and often comes with out of date software and in the case of Homebrew, it often compiles from source anyway.
There are also cases, like on macOS, where the package manager is unreliable and often comes with out of date software and in the case of Homebrew, it often compiles from source anyway.
It's a bit more tricky with macOS and where to get cargo, see https://github.com/LunarVim/LunarVim/issues/1021#issuecomment-915851897
Which system did you say you were using?
I'm using Manjaro which initially lacks both xclip
and fd
. I've also tested Ubuntu and Fedora, where they're installed by default. On Debian xclip
is missing but fd
is fine.
In Debian, fd
references to another binary and not https://github.com/sharkdp/fd. Ref: The docs of https://github.com/sharkdp/fd
I am not sure of the Debian fd
is the same as the rust package find-fd
that LunarVim uses, since I don't use Debian and can't find any docs on this. @christopher-besch Could you look into this, since it seems like you have a Debian system? A fast fd -h
might be sufficient.
Interesting...
The Debian package for fd is called fd-find
. I installed that and it exposed fd only through fdfind
, without the dash. There is no fd
package for Debian.
This is the help page you requested:
I wonder if LunarVim is even capable of finding that weird fdfind
command.
I wonder if LunarVim is even capable of finding that weird
fdfind
command.
I'm always hesitant to how much additional processing I can do in the installer because it's a headache not being able to use basic bash features (e.g. associative arrays) on macOS 😢
see LunarVim/LunarVim@a9bf1d0
(#1052)
I'd much rather stop trying to re-invent the wheel and instead use actual native tools per-platform for detecting dependencies.
You can alias fdfind to fD, just follow the guide in the docs.
You can alias fdfind to fD, just follow the guide in the docs.
But that's something the user has to do. It's obviously be much more convenient for the installation script to do that job.
I'm always hesitant to how much additional processing I can do in the installer [...]
I feel you. Your efforts are very much appreciated! What kind of dependency detection tools are you thinking about?
You can alias fdfind to fD, just follow the guide in the docs.
But that's something the use has to do. It's obviously be much more convenient for the installation script to do that job.
I'm always hesitant to how much additional processing I can do in the installer [...]
I feel you. Your efforts are very much appreciated! What kind of dependency detection tools are you thinking about?
If the user chooses to manually install all dependencies, I think they should do the job.
Regarding the detection of dependencies, are we talking about only the *NIX systems? If so, I got a neat built in method that I use in my fish config.
if command -v <the_command> &> /dev/null
do_stuff_if_command_is_found
else
do_something_else
end
The fish code above should Posix compliant
But that's something the user has to do. It's obviously be much more convenient for the installation script to do that job.
I don't think it's that easy to do with only user-level privileges. Hell, some users don't even have npm install
working without sudo
. And technically, none of these are a requirement, but more in the quality-of-life category.
I feel you. Your efforts are very much appreciated!
Thank you ❤️
What kind of dependency detection tools are you thinking about?
Ideally, your package manager should deal with this, because the alternative is very time-consuming when trying to create a cross-platform dependency-aware installer from scratch.
Ideally, your package manager should deal with this [...]
So we'd need to publish LunarVim on all kinds of package managers?
So we'd need to publish LunarVim on all kinds of package managers?
Only the most popular ones from each platform:
- Linux: PKGBUILD and maybe Nix
- OSX: Homebrew
- OpenBSD: these gurus can handle following simple instructions
- Windows: maybe scoop (although I just realized that we can re-use PKGBUILD with msys!)
The alternative is that someone has to write that package manager just for lunarvim 😞
What about Arch?
Arch uses PKGBUILD. Example: Tensorflow PKGBUILD