preservim / vimux

easily interact with tmux from vim
MIT License
2.19k stars 158 forks source link

Ubuntu + Neovim AppImage #191

Closed Gee19 closed 3 years ago

Gee19 commented 3 years ago

I recently started using this plugin and wanted to say this is awesome, nice work. I was able to get it up and running in a WSL2 Ubuntu 18.04 environment (Windows Terminal) and had 0 troubles. I gave it a shot on my laptop but I can't get the plugin to open a pane at all.

I am running Ubuntu 18.04, kitty terminal, tmux + the neovim appimage (same one as in my WSL2 env) but cannot get the plugin to work at all. It is installed, I can run :h vimux successfully, I get autocomplete for functions when typing :Vimux<tab>.

relevant bits of my vimrc:

call plug#begin('~/.vim/plugged')
Plug 'preservim/vimux'
call plug#end()
...
if exists('$TMUX')
  let g:VimuxRunnerName = "vimuxout"

  augroup vimux_maps
    autocmd!
    autocmd FileType python map <buffer> <leader>tt :call VimuxRunCommand("clear; pytest -vv " . expand('%:p'))<CR>
    " autocmd FileType cucumber map <leader>tt :RunAllCukes<CR>
  augroup END

  nnoremap <leader>tp :VimuxPromptCommand<CR>
  nnoremap <leader>to :VimuxOpenRunner<CR>
  nnoremap <leader>tq :VimuxCloseRunner<CR>
endif

tmux -V

tmux 2.6

:version

:version
NVIM v0.5.0-dev+1176-g9481310c2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-protot
ypes -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3
 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build
/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az49-569

Features: +acl +iconv +tui

Is there something I can do for more verbose logging? Maybe its related to #167

alerque commented 3 years ago

I imagine you have a similar problem to #167 but for a different reason. I highly recommend not using AppImages (or Flatpaks or any other containerized packaging) for anything that interacts with other things on the system, particularly in nix pipelines. I know it worked for you in WSL2, but Windows is a lot less granular in how it handles permissions, and on the nix side you're going to run into file system permission issues when they try to pass things like temporary files to each other.

Ubuntu 18.04 has perfectly up to date stable NeoVIM packages using the standard system package system. See https://packages.ubuntu.com/focal/neovim

We use this in CI testing and it is demonstrated to work for every commit to the project.

If you must have the development builds, I see there is a neovim-ppa with unstable 0.5.0-dev packages as well.

Can you try those and see if this problem goes away?

Gee19 commented 3 years ago

Tried this in both environments with neovim-ppa/unstable and everything still worked in WSL2 but still no luck in native Ubuntu.

alerque commented 3 years ago

I'm not sure what to say, or what questions to even ask. We're testing this on Ubuntu using stable NeoVIM packages (see this workflow) and that works, so we know native Ubuntu works with NeoVIM and this plugin.

We don't test it in CI but I personally run NeoVIM unstable builds too (on Arch Linux). My current version is NVIM v0.5.0-dev+1236-g1b030f889 which is even newer than what you are showing by about 60 commits. Vimux works fine for me.

We'd be happy to see this fixed, but it seems very specific to your setup. If you're not interested in putting time into it there isn't much we can do.

One final stab in the dark: Your TMUX version is also old. I suppose it's possible this is because we're testing on Focal 20.04 not the older Bionic 18.04 that you have. The TMUX version in Bionic is even a year older than Bionic itself. Focal and Groovy both have 3.0 versions of TMUX. My Arch Linux system has 3.1. If we've broken something in backwards compatibility with TMUX it would be nice to fix it or at least figure out what the minimum version is. I know we ditched 1.x compatibility but I don't think we left 2.x behind on purpose.

alerque commented 3 years ago

Scratch that last guess. I just added Ubuntu 18.04 to our test matrix so we're now testing TMUX 2.6 like you have, and it worked fine.

alerque commented 3 years ago

And for completeness I've now expanded our test matrix to include unstable development builds of NeoVIM from that PPA I linked. Here is a complete run that includes the exact combination you are using (Ubuntu 18.04 + NeoVIM unstable) and the plugin is functioning. Something else is messed up with your system: either with other VIM plugins interfering, your system not being stock and having something messed up with permissions, or perhaps even a TMUX config problem.

In any case I think I'm at the end of what I can do from this side.

Gee19 commented 3 years ago

No need to re-open this, it was definitely related to my out of date tmux. I'm working on getting a more up to date environment I can reproduce [0] but I realized this plugin gave me more power than I needed so I'll stick with tbone + a simple function for now. I may end up trying vimux again and revisit this issue if my needs change but until then.. Apologies for the trouble

0 - https://github.com/Gee19/dotfiles/pull/6/files