Skip to content

bug: Error installing via Lazy #111

@flarocca

Description

@flarocca

Did you check docs and existing issues?

  • I have read all the plugin docs
  • I have searched the existing issues
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.10.2

Operating system/version

MacOS 15.1.1

Describe the bug

When installing the plugin with Lazy, It keeps erroring "Build failed: Could not find library file for GIT2".
The plugin setup seems to ignore the libgit2_path. Among the list of searched path, the custom configuration I set up does not show up.

I can't figure out what I am missing.

Current location of libgit2.dylib file is at /opt/homebrew/lib/libgit2.dylib
Current location of git2 is at /opt/homebrew/bin/git2

.zshrc variable exports I unsuccessfully tried are:

export LIBGIT2="/opt/homebrew/lib/libgit2.dylib"
export GIT2_LIBDIR="/opt/homebrew/lib/libgit2.dylib"
export GIT2_DIR="/opt/homebrew"
export GIT2="/opt/homebrew/bin"

Configurations I unsuccessfully tried are:

-- At init.lua
require('fugit2').setup({
  libgit2_path = "/opt/homebrew/lib/libgit2.dylib",
})

-- Via plugin
return     {
        "SuperBo/fugit2.nvim",
        lazy = false,
        opts = {
            width = 100,
            external_diffview = true,
            libgit2_path = "/opt/homebrew/lib/libgit2.dylib",
        },
        dependencies = {
            "MunifTanjim/nui.nvim",
            "lewis6991/gitsigns.nvim",
            "nvim-tree/nvim-web-devicons",
            "nvim-lua/plenary.nvim",
            "sindrets/diffview.nvim",
            {
                "chrisgrieser/nvim-tinygit", 
                dependencies = { "stevearc/dressing.nvim" },
            },
        },
        cmd = { "Fugit2", "Fugit2Diff", "Fugit2Graph" },
    },

Steps To Reproduce

I don't really know how to reproduce it.

Expected Behavior

Plugin can be successfully installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions