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

Remember Harpoon2 files #116

Open
jeroenvermunt opened this issue Apr 22, 2024 · 3 comments
Open

Remember Harpoon2 files #116

jeroenvermunt opened this issue Apr 22, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@jeroenvermunt
Copy link

I am using this plugin and notices it remembers projects specific harpoon setups, which is amazing!

I noticed this functionality stopped when switching to Harpoon2. For this reason I am staying at harpoon 1.

Would it be possible to preserve the session harpoon state for Harpoon?

@jeroenvermunt jeroenvermunt added the enhancement New feature or request label Apr 22, 2024
@Shatur
Copy link
Owner

Shatur commented Apr 22, 2024

I'm not sure, the plugin just tracks last working directories. Can't say what changes between 1 and 2 versions.

@wilsonchen719
Copy link

Experience same issue here. Really looking forward if both plugins works well together.
It seems that Harpoon tracked listed buffer based on directory where Neovim opened.

@DanielWeidinger
Copy link

Had the same issue. The problem is that harpoon initializes its internal list right when the lua module is first required. I fixed it by loading the harpoon module after the session is loaded.

    local config_group = vim.api.nvim_create_augroup("SessionGroup", {})
    vim.api.nvim_create_autocmd({ "User" }, {
        pattern = "SessionLoadPost",
        group = config_group,
        callback = function()
            ...
            -- Setup harpoon after session is loaded
            require("harpoon")
            ...
        end,
    })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants