sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.57k stars 101 forks source link

Struggling with unbinding tab keymap #422

Closed jsammone closed 9 months ago

jsammone commented 9 months ago

I have tab binded in my default neovim configuration. I would like to disable the diffview tab keybind to stop it from overwriting my default keybind but struggling to figure it out.

I'm using the Lazy plugin manager and included my plugin configuration below.

I'm sure this is simple but have tried for an hour. Thanks for the great plugin and any assistance anyone can provide.

return {
    "sindrets/diffview.nvim",
    config = function()
        require("diffview").setup({
            keymaps = {
                ["<tab>"] = false,
                view = {
                    { "n", "<tab>", false },
                    -- Disable the default normal mode mapping for `<tab>`:
                },
            },
        })
    end,
}

NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3

sindrets commented 9 months ago

This configuration is correct, and it works for me, both in my own config and with a minimal config (you don't need the top-level [<tab>] = false though).

Are you sure you're configuring keymaps for the correct context? The view keymaps control the mappings in the diff buffers.

jsammone commented 9 months ago

This configuration is correct, and it works for me, both in my own config and with a minimal config (you don't need the top-level [<tab>] = false though).

Are you sure you're configuring keymaps for the correct context? The view keymaps control the mappings in the diff buffers.

Ahh sorry, I misunderstood what was happening. Changing the keymap for both view and file_panel is what I wanted.

Thank you for the help.