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

Got error in Gitsigns blame_line #409

Closed
Alienover opened this issue Nov 19, 2021 · 0 comments
Closed

Got error in Gitsigns blame_line #409

Alienover opened this issue Nov 19, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Alienover
Copy link

Description

image

E5108: Error executing lua ...pack/packer/opt/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: ...
e/pack/packer/opt/gitsigns.nvim/lua/gitsigns/actions.lua:494: attempt to index local 'opts0' (a nil value)

Neovim version

NVIM v0.5.1 Build type: Release

Operating system and version

macOS Monterey v12.0.1

Steps to reproduce

  1. nvim xxx.txt
  2. exectue :Gitsigns blame_line

Expected behavior

No response

Actual behavior

image

Gitsigns debug messages

No response

Minimal config

return require("packer").startup({
    function(use)

        -- Other plugins setup

        use({
            "lewis6991/gitsigns.nvim",
            opt = true,
            event = "BufReadPre",
            wants = "plenary.nvim",
            requires = { "nvim-lua/plenary.nvim" },
            config = function()
                require("gitsigns").setup({
                    signs = {
                        add = {
                            hl = "GitSignsAdd",
                            text = "",
                            numhl = "GitSignsAddNr",
                            linehl = "GitSignsAddLn",
                        },
                        change = {
                            hl = "GitSignsChange",
                            text = "",
                            numhl = "GitSignsChangeNr",
                            linehl = "GitSignsChangeLn",
                        },
                        delete = {
                            hl = "GitSignsDelete",
                            text = "",
                            numhl = "GitSignsDeleteNr",
                            linehl = "GitSignsDeleteLn",
                        },
                        topdelete = {
                            hl = "GitSignsDelete",
                            text = "",
                            numhl = "GitSignsDeleteNr",
                            linehl = "GitSignsDeleteLn",
                        },
                        changedelete = {
                            hl = "GitSignsChange",
                            text = "",
                            numhl = "GitSignsChangeNr",
                            linehl = "GitSignsChangeLn",
                        },
                    },
                    keymaps = {
                        -- Default keymap options
                        noremap = true,
                        buffer = true,
                        ["n ]c"] = {
                            expr = true,
                            "&diff ? ']c zz' : '<cmd>lua require\"gitsigns\".next_hunk()<CR> zz'",
                        },
                        ["n [c"] = {
                            expr = true,
                            "&diff ? '[c zz' : '<cmd>lua require\"gitsigns\".prev_hunk()<CR> zz'",
                        },
                        ["n <leader>ghs"] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
                        ["n <leader>ghu"] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
                        ["n <leader>ghr"] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
                        ["n <leader>ghR"] = '<cmd>lua require"gitsigns".reset_buffer()<CR>',
                        ["n <leader>ghp"] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
                        ["n <leader>ghb"] = '<cmd>lua require"gitsigns".blame_line()<CR>',
                        -- Text objects
                        ["o ih"] = ':<C-U>lua require"gitsigns".select_hunk()<CR>',
                        ["x ih"] = ':<C-U>lua require"gitsigns".select_hunk()<CR>',
                    },
                })
            end,
        })
    end,
    config = {
        display = {
            open_fn = function()
                return require("packer.util").float(Utils.get_float_win_opts({
                    border = true,
                }))
            end,
        },
    },
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant