generated from ellisonleao/nvim-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Install libgit2
SuperBo edited this page Jul 4, 2024
·
7 revisions
libgit2 is the core of git tasks in Fugit2. In order to use this plugin, you have to install and configure libgit2 first.
See plugin setup for detail plugin setup after done installing libgit2.
sudo apt-get install -y libgit2-1.1
# sudo ln -s /usr/lib/x86_64-linux-gnu/libgit2.so.1.1 /usr/local/lib/libgit2.so
# sudo ldconfig
Set libgit2_path value in config options like this
-- Fugit2 setup table
{
libgit2_path = 'libgit2.so.1.1',
...
}
# rocks.toml
[plugins."fugit2.nvim".config]
libgit2_path = "libgit2.so.1.1"
sudo apt-get install -y libgit2-1.5
# sudo ln -s /usr/lib/x86_64-linux-gnu/libgit2.so.1.5 /usr/local/lib/libgit2.so
# sudo ldconfig
Set libgit2_path value in config options like this
-- Fugit2 setup table
{
libgit2_path = 'libgit2.so.1.5',
...
}
# rocks.toml
[plugins."fugit2.nvim".config]
libgit2_path = "libgit2.so.1.5"
sudo apt-get install -y libgit2-1.7
Set libgit2_path value in config options like this
-- Fugit2 setup table
{
libgit2_path = 'libgit2.so.1.7',
...
}
# rocks.toml
[plugins."fugit2.nvim".config]
libgit2_path = "libgit2.so.1.7"
sudo pacman -S libgit2
yum install libgit2
Set libgit2_path value in config options like this, change corresponding version.
-- Fugit2 setup table
{
libgit2_path = 'libgit2.so.1.7',
...
}
# rocks.toml
[plugins."fugit2.nvim".config]
libgit2_path = "libgit2.so.1.7"
nix-env -iA nixpkgs.libgit2
# Find libgit2 library path
ls /nix/store | grep "*libgit2-20*
Then put that path to your neovim setup like this
-- Fugit2 setup table
{
libgit2_path = '/nix/store/<above path>/lib/libgit2.so',
...
}
# rocks.toml
[plugins."fugit2.nvim"]
version = "0.2.0"
install_args = [
"GIT2_DIR=/nix/store/<above path>"
]
[plugins."fugit2.nvim".config]
libgit2_path = "/nix/store/<above path>/lib/libgit2.so"
brew install libgit2
Set libgit2_path value in config options like this if you have problem loading libgit2 library with default settings.
Mac Arm M1/M2/M3
-- Fugit2 setup table
{
libgit2_path = '/opt/homebrew/lib/libgit2.dylib',
...
}
# rocks.toml
[plugins."fugit2.nvim"]
version = "0.2.1"
install_args = [
"GIT2_DIR=/opt/homebrew"
]
[plugins."fugit2.nvim".config]
libgit2_path = "/opt/homebrew/lib/libgit2.dylib"
Mac Intel
-- Fugit2 setup table
{
libgit2_path = '/usr/local/opt/libgit2/lib/libgit2.dylib',
...
}
# rocks.toml
[plugins."fugit2.nvim"]
version = "0.2.1"
install_args = [
"GIT2_DIR=/usr/local/opt/libgit2"
]
[plugins."fugit2.nvim".config]
libgit2_path = "/usr/local/opt/libgit2/lib/libgit2.dylib"
choco install libgit2
-- Fugit2 setup table
{
libgit2_path = '/path/to/libgit2/libgit2.dll',
...
}
# rocks.toml
[plugins."fugit2.nvim"]
version = "0.2.1"
install_args = [
"GIT2_DIR=/path/to/libgit2"
]
[plugins."fugit2.nvim".config]
libgit2_path = "/path/to/libgit2.dll"