kiyoon / treemux

A modern file explorer (Nvim-Tree) as a Tmux sidebar, with dynamic updates and bi-directional interaction.
MIT License
138 stars 2 forks source link

crashing #5

Open plutonium-239 opened 4 months ago

plutonium-239 commented 4 months ago

Hi, I'm trying to use this plugin but it crashes every time I try to open it (prefix+TAB).

It only returns this error:

'/home/<>/.tmux/plugins/treemux/scripts/toggle.sh 'nvim,~/.tmux/plugins/treemux/configs/treemux_init.lua,,python3,left,40,top,70%,editor,0.5,2,@treemux-refresh-interval-inactive-[0/0]w,0' '%7'' returned 1

Notably, I don't have nvim installed but python3 is present.

kiyoon commented 4 months ago

Can you install nvim and try again?

plutonium-239 commented 4 months ago

That didn't help it either Is there a way I can get a more verbose error?

kiyoon commented 4 months ago

Can you run the script directly with tmux with the same arguments? I think it will at least say where it went wrong

plutonium-239 commented 4 months ago

How do I do that (run a script "directly with tmux")?

If I try to run the script normally in a new window:

⋊> ~/.tmux/plugins/treemux/scripts/toggle.sh 'nvim,~/.tmux/plugins/treemux/configs/treemux_init.lua,,python3,left,40,top,70%,editor,0.5,2,1000,0' 
/home/pu239/.tmux/plugins/treemux/scripts/toggle.sh: line 158: [: tmux_version_int: integer expression expected
source and target panes must be different
no last pane

I substituted @treemux-refresh-interval-inactive-window for 1000 (although I was getting the same error without replacing as well)

kiyoon commented 4 months ago

I think you forgot the last argument '%7' which is a tmux pane identifier.

What happens with that?

plutonium-239 commented 4 months ago

Yeah, you're right, I missed that

Error detected while processing /home/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:
E5113: Error while calling lua chunk: ...e/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:56: module 'lazy' not found:
        no field package.preload['lazy']
        no file './lazy.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy/init.lua'
        no file './lazy.so'
        no file '/usr/local/lib/lua/5.1/lazy.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/lazy.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        ...e/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:56: in main chunk
Error detected while processing command line:
E5108: Error executing lua [string ":lua"]:1: module 'nvim-tree.api' not found:
        no field package.preload['nvim-tree.api']
        no file './nvim-tree/api.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/nvim-tree/api.lua'
        no file '/usr/local/share/lua/5.1/nvim-tree/api.lua'
        no file '/usr/local/share/lua/5.1/nvim-tree/api/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/nvim-tree/api.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/nvim-tree/api/init.lua'
        no file './nvim-tree/api.so'
        no file '/usr/local/lib/lua/5.1/nvim-tree/api.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/nvim-tree/api.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './nvim-tree.so'
        no file '/usr/local/lib/lua/5.1/nvim-tree.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/nvim-tree.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk
kiyoon commented 4 months ago

Can you run this command?

nvim -u ~/.tmux/plugins/treemux/configs/treemux_init.lua

The "lazy.nvim" is a package manager, and it should be automatically installed but in your case it doesn't do that. It uses git to clone the github repository, and maybe your git command is somehow locked with password or something like that?

plutonium-239 commented 4 months ago

It gives the same error

Error detected while processing /home/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:
E5113: Error while calling lua chunk: ...e/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:56: module 'lazy' not found:
        no field package.preload['lazy']
        no file './lazy.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy/init.lua'
        no file './lazy.so'
        no file '/usr/local/lib/lua/5.1/lazy.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/lazy.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        ...e/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:56: in main chunk
Press ENTER or type command to continue

git clone on public repos works without a password. Anyways, I'll try to install lazy.nvim and then proceed.