Skip to content

Bug: assertion failed! when trying to copy a link #257

@loganswartz

Description

@loganswartz

Ever since updating to f643cdf or newer, I get this error every time I try to copy a link:

Error executing Lua callback: ...nvim/lazy/gitlinker.nvim/lua/gitlinker/commons/async.lua:78: assertion failed!
stack traceback:
        [C]: in function 'assert'
        ...nvim/lazy/gitlinker.nvim/lua/gitlinker/commons/async.lua:78: in function '_sync_link'
        .../.local/share/nvim/lazy/gitlinker.nvim/lua/gitlinker.lua:335: in function <.../.local/share/nvim/lazy/gitlinker.nvim/lua/gitlinker.lua:321>

Specifically, this assert fails:

assert(not coroutine.running())

After reverting to 8e193f0, everything works as expected. I don't think this is linked to a Neovim update, since it's been happening for a while and I'm on nightly, but just in case here's my current version:

NVIM v0.11.0-dev+1551-ge8ddb7a46
Build type: RelWithDebInfo
LuaJIT 2.1.1720049189

What's the output of git remote get-url origin?

It happens on every repo, but here's an example: git@github.com:loganswartz/dotfiles.git

what's the expect git host url you want to generate?

N/A

how do you configure this plugin?

Via lazy.nvim:

{
    'linrongbin16/gitlinker.nvim',
    main = 'gitlinker',
    config = true,
    keys = {
        {
            '<leader>gy',
            function() require('gitlinker').link() end,
            silent = true,
            noremap = true,
            desc = "Copy git permlink to clipboard",
            mode = { 'n', 'v' }
        },
    },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions