Open stickperson opened 1 year ago
The error message you encountered, "./nvim.appimage: Exec format error," typically indicates that the executable file is not compatible with the architecture of your system (M2 ARM). In your case, the issue is likely arising from running the command in a Docker image for Ubuntu 20.04 on a macOS machine with an M2 chip.
So the way how the current plugin installs NVIM inside the Docker container here, is not compatible with the architecture of your host. In order to fix that, the way nvim is installed in the Docker container (based on ubuntu 20.04) needs to be adapted to your architecture.
I'm currently aware of this problem and there is an enhancement created already: #5 So closing this issue in favor of #5.
In fact, I'm currently working on that, we can continue the discussion in the other issue @stickperson
It looks like currently there are no nvim.appimage built for arm / aarch64 architecture https://github.com/neovim/neovim/issues/15143
The PR has been merged @stickperson , can you check if it works now in your machine? There can still be issues as I do not have access to a mac with m2 arm architecture.
There's an issue with spam_container.sh
where env
is passed in as an empty string. I'm not setting anything special, just copying what's in the README. After removing the env
check, I could get the build up and running. DevcontainerConnect
doesn't seem to do anything though; it exits nvim and that's it.
With this PR https://github.com/arnaupv/nvim-devcontainer-cli/pull/11 I'm fixing the problem from DevcontainerConnect
:
(if you still experience problems, these are the commands I'm using for opening a new terminal in Mac)
https://github.com/arnaupv/nvim-devcontainer-cli/blob/main/bin/connect_to_devcontainer.sh#L33-L38
It would be great if you can check if it works in your machine or adjust such lines to make it work!
Also the env
problem, is also fixed in this other PR: https://github.com/arnaupv/nvim-devcontainer-cli/pull/12
Both PRs have been merged.
Hi @stickperson the DevcontainerConnect
command still is not working on iTerm and Mac Terminal. What you can do instead to try the plugin after running DevcontainerUp is leaving neovim and from the root folder of the repo run the following script:
./bin/open_shell_in_devcontainer.sh
this will connect you to the devcontainer and you can try stuff there
However this is definitely far from ideal. In order to make DevcontainerConnect
work for MacOS, we need to fix the problem here with iTerm and Terminal (This problem is not present for Alacritty or Gnome-Terminal for instance).
The problem is here, where the command open -a iTerm.app will open a new terminal and try to run this script "${SCRIPT_DIR}"/open_shell_in_devcontainer.sh
from the HOME folder! And that's the problem!! Ideally this should have to open another terminal in the same folder than the first terminal (this is the behavior for Gnome-Terminal and Alacritty, but not for iTerm or Terminal).
I'm not familiar on MacOS but for fixing that looks like an applescript could do the work for us, it would be great if you can try it out!
tell application "iTerm"
activate
if exists window 1 then
set currentDir to (quoted form of (get target of current session of window 1 as string))
else
set currentDir to ""
end if
set newWindow to (create window with default profile)
tell newWindow
tell current session
write text "cd " & currentDir
write text "${SCRIPT_DIR}"/open_shell_in_devcontainer.sh
end tell
end tell
end tell
Save this script in new_iterm_window.scpt
and then execute it from an iTerm
open -a iTerm.app "osascript new_iterm_window.scpt"
...
Or maybe this is too cumbersome and the only thing that's needed is to Configure iTerm throught the configurations clicking somewhere to force that when a terminal is open from another terminal the folder is preserved.
Neovim version: v0.9.1 OS: macOS Venture (M2 chip) Error: I see the following error when running
DevcontainerUp
Steps to reproduce: Clone this repo, cd into the root, open neovim and run
DevcontainerUp