GR3YH4TT3R93 / zellij-nav.nvim

a Neovim plugin to help navigate betweeen Zellij panes as well as create new ones!
GNU General Public License v3.0
8 stars 1 forks source link

question: zellij-autolock requirment #1

Closed JonnyLoughlin closed 1 month ago

JonnyLoughlin commented 1 month ago

First, love the plugin. Works very well and the config is super simple.

My questions is why is zellij-autolock needed? I installed it at first, but noticed it wasn't actually toggling locked mode. So I tried removing it and restarting zellij and the plugin works completely fine without. Knowing very little of the inner workings, I'd expect move commands to be issued twice or something similar without autolock, but afaik everything is working well.

My config:

return {
    "GR3YH4TT3R93/zellij-nav.nvim",
    init = function() -- Only needed if you want to override default keymaps otherwise just call opts = {}
        -- vim.g.zellij_nav_default_mappings = false -- Default: true
    end,
    opts = {}, -- Optional
    keys = {}, -- define your own keymaps e.g keys = { { "<C-h>", "<cmd>ZellijNavigateUp<CR>", { silent = true, desc = "Move to Zellij pane up" } } }
}
plugins {
    zjstatus location="https://github.com/dj95/zjstatus/releases/latest/download/zjstatus.wasm" 
    // autolock location="https://github.com/fresh2dev/zellij-autolock/releases/latest/download/zellij-autolock.wasm" {
    //     triggers "nvim"
    //     watch_triggers "fzf"
    //     watch_interval "1.0"
    // }
}

keybinds clear-defaults=true {
    normal {}
    shared_except "normal" "locked" {
        bind "Esc" { SwitchToMode "Normal"; }
    }
    // Standard Mode Bindings
    locked {
        bind "Alt g" { SwitchToMode "Normal"; }
    }
    shared_except "locked" {
        bind "Alt g" { SwitchToMode "Locked"; }
        // Pane Settings
        bind "Alt h" { MoveFocusOrTab "Left"; }
        bind "Alt l" { MoveFocusOrTab "Right"; }
        bind "Alt j" { MoveFocus "Down"; }
        bind "Alt k" { MoveFocus "Up"; }
        bind "Alt x" { NewPane "Down"; SwitchToMode "Normal"; }
        bind "Alt v" { NewPane "Right"; SwitchToMode "Normal"; }

        // Tab Settings
        bind "Alt H" { MoveTab "Left"; }
        bind "Alt J" { MoveFocusOrTab "Left"; }
        bind "Alt K" { MoveFocusOrTab "Right"; }
        bind "Alt L" { MoveTab "Right"; }
        bind "Alt V" { NewTab; }
        bind "Alt 1" { GoToTab 1; }
        bind "Alt 2" { GoToTab 2; }
        bind "Alt 3" { GoToTab 3; }
        bind "Alt 4" { GoToTab 4; }
        bind "Alt 5" { GoToTab 5; }
        bind "Alt 6" { GoToTab 6; }
        bind "Alt B" { BreakPane; }

        // Floating Settings
        bind "Alt o" { ToggleFloatingPanes; }
        bind "Alt O" { TogglePaneEmbedOrFloating; }
        bind "Alt n" { NextSwapLayout; }

        // Plugin Setting
        bind "Alt /" {
            LaunchOrFocusPlugin "zellij:session-manager" {
                floating true
            }
        }
    ...
    }
}

Thanks again for the great plugin!

JonnyLoughlin commented 1 month ago

I'm dumb, its splits within Nvim that fail.