5
30
Fork
You've already forked nvim-dev-container
3

How to run commands from inside Neovim? #78

Open
opened 2022年08月28日 19:02:27 +02:00 by iamgianluca · 20 comments

Hi,

I'm new to using Lua plugins, so apologies if I'm asking anything stupid.

A year ago, I switched to VS Code to be able to develop from within a Docker container running on a remote server. This plugin would allow me to replicate at least part of this workflow in Neovim. The main difference would be that the Neovim client will be running on the server and not on my local laptop.

Although not exactly what I wanted to do, I think this is close enough! The main advantage seems to be that I won't have to pollute my Docker image with the code necessary to install Neovim, plugins, and config files. That's great!

Long story short, I've installed the plugin via vim-plug, alongside tree-sitter, and copied the default settings in the ~/.config/nvim/lua/devcontainer/init.lua.

However, I think I might have missed some important steps because I don't seem to be able to run any of the commands from inside Neovim. I tried to execute :DevcontainerAttachAuto but I got the following error message.

E492: Not an editor command: DevcontainerAttachAuto

What am I missing?

Many thanks,
Luca

Hi, I'm new to using Lua plugins, so apologies if I'm asking anything stupid. A year ago, I switched to VS Code to be able to develop from within a Docker container running on a remote server. This plugin would allow me to replicate at least part of this workflow in Neovim. The main difference would be that the Neovim client will be running on the server and not on my local laptop. Although not exactly what I wanted to do, I think this is close enough! The main advantage seems to be that I won't have to pollute my Docker image with the code necessary to install Neovim, plugins, and config files. That's great! Long story short, I've installed the plugin via vim-plug, alongside tree-sitter, and copied the default settings in the `~/.config/nvim/lua/devcontainer/init.lua`. However, I think I might have missed some important steps because I don't seem to be able to run any of the commands from inside Neovim. I tried to execute `:DevcontainerAttachAuto` but I got the following error message. ``` E492: Not an editor command: DevcontainerAttachAuto ``` What am I missing? Many thanks, Luca

Hi Luca,

Thanks for checking out the plugin. Can you confirm that the setup function is called? I assume it is now located in your ~/.config/nvim/lua/devcontainer/init.lua file, since that is where the settings are.

If you have just copied it there, you will still need to required that file somewhere in your main configuration. The scheme you have selected will have a conflict with this plugin, since it uses that directory, so you won't be able to just require it.

You can either move contents of that file to e.g. ~/.config/nvim/lua/plugin/devcontainer.lua and it will automatically be activated, or you can move it to some other directory liek ~/.config/nvim/lua/iamgianluca/devcontainer.lua and in your init.lua call require("iamgianluca.devcontainer").

Let me know if that works for you!

Hi Luca, Thanks for checking out the plugin. Can you confirm that the `setup` function is called? I assume it is now located in your `~/.config/nvim/lua/devcontainer/init.lua` file, since that is where the settings are. If you have just copied it there, you will still need to required that file somewhere in your main configuration. The scheme you have selected will have a conflict with this plugin, since it uses that directory, so you won't be able to just `require` it. You can either move contents of that file to e.g. `~/.config/nvim/lua/plugin/devcontainer.lua` and it will automatically be activated, or you can move it to some other directory liek `~/.config/nvim/lua/iamgianluca/devcontainer.lua` and in your `init.lua` call `require("iamgianluca.devcontainer")`. Let me know if that works for you!

Hi Ensar,

Thank you for your answer! I've moved the file to ~/.config/nvim/lua/plugin/devcontainer.lua as you suggested. The content to ~/.config/nvim/lua/plugin/devcontainer.lua is this:

require('devcontainer').setup{}

What shall I do from inside Neovim to run DevcontainerAttachAuto? I tried several things but none seems to work:

:lua require('devcontainer').DevcontainerAttachAuto 
:lua require('devcontainer.DevcontainerAttachAuto') 
:lua require('devcontainer').DevcontainerAttachAuto{} 
:lua require('devcontainer').DevcontainerAttachAuto() 

One thing I forgot to specify is that I'm still using an init.vim file to install my plugins, settings and remapping keybindings. I don't know if this has any impact on how the plugin works and/or should be used.

I also don't use docker-container, but build and run my containers directly from the docker CLI.

devcontainer: require("devcontainer.health").check()
========================================================================
## Neovim version
 - OK: Neovim version tested and supported: 0.8.0
## Required plugins
 - OK: Jsonc treesitter parser available. ABI version: 13
## External dependencies
 - OK: Docker version 20.10.7, build f0df350
 - ERROR: docker-compose is not executable! It is required for full functionality of this plugin!

I can also confirm that I currently have a docker container up and running when trying to connect to it.

Hi Ensar, Thank you for your answer! I've moved the file to `~/.config/nvim/lua/plugin/devcontainer.lua` as you suggested. The content to `~/.config/nvim/lua/plugin/devcontainer.lua` is this: ``` require('devcontainer').setup{} ``` What shall I do from inside Neovim to run `DevcontainerAttachAuto`? I tried several things but none seems to work: ``` :lua require('devcontainer').DevcontainerAttachAuto :lua require('devcontainer.DevcontainerAttachAuto') :lua require('devcontainer').DevcontainerAttachAuto{} :lua require('devcontainer').DevcontainerAttachAuto() ``` One thing I forgot to specify is that I'm still using an `init.vim` file to install my plugins, settings and remapping keybindings. I don't know if this has any impact on how the plugin works and/or should be used. I also don't use docker-container, but build and run my containers directly from the docker CLI. ``` devcontainer: require("devcontainer.health").check() ======================================================================== ## Neovim version - OK: Neovim version tested and supported: 0.8.0 ## Required plugins - OK: Jsonc treesitter parser available. ABI version: 13 ## External dependencies - OK: Docker version 20.10.7, build f0df350 - ERROR: docker-compose is not executable! It is required for full functionality of this plugin! ``` I can also confirm that I currently have a docker container up and running when trying to connect to it.

Plugin is correctly installed, since healthcheck would not work otherwise. If setup is called correctly, it should be possible to just use :DevcontainerAttachAuto or you can also use lua function :lua require("devcontainer.commands").attach_auto(). In the latter you can also provide your own callback if you wish.

Let me know if that works for you.

Plugin is correctly installed, since healthcheck would not work otherwise. If setup is called correctly, it should be possible to just use `:DevcontainerAttachAuto` or you can also use lua function `:lua require("devcontainer.commands").attach_auto()`. In the latter you can also provide your own callback if you wish. Let me know if that works for you.

I figured out the issues I had in my configuration. I forgot to add a lua require('devcontainer').setup{} at the end of my init.vim file.

Then, I also realized I needed a .devcontainer/devcontainer.json file on my project folder. I created one with the following content:

{
 "name": "Existing Dockerfile",
 "context": "..",
 "dockerFile": "../Dockerfile"
}

Now I'm seemingly able to run every Devcontainer commands from inside Nvim. I still need to figure out why the LSP (CoC + coc-pyright) is not able to jump to the definition of some dependencies I've installed through the following command in my Dockerfile

COPY requirements.txt /workspace/requirements.txt
RUN pip install -r requirements.txt

These are third party libraries like loguru or pytorch-lightning. At least, I seem to be able to navigate the rest of the project. So, that's progress 👍

The funny thing is that, if I try to access the Docker container created by Devcontainer, I can correctly import those libraries in an interactive Python interpreter. So the libraries are actually installed. It just seems that Coc is not able to see them (?). Is this the expected behavior?

I figured out the issues I had in my configuration. I forgot to add a `lua require('devcontainer').setup{}` at the end of my `init.vim` file. Then, I also realized I needed a `.devcontainer/devcontainer.json` file on my project folder. I created one with the following content: ``` { "name": "Existing Dockerfile", "context": "..", "dockerFile": "../Dockerfile" } ``` Now I'm seemingly able to run every Devcontainer commands from inside Nvim. I still need to figure out why the LSP (CoC + coc-pyright) is not able to jump to the definition of some dependencies I've installed through the following command in my Dockerfile ``` COPY requirements.txt /workspace/requirements.txt RUN pip install -r requirements.txt ``` These are third party libraries like loguru or pytorch-lightning. At least, I seem to be able to navigate the rest of the project. So, that's progress 👍 The funny thing is that, if I try to access the Docker container created by Devcontainer, I can correctly import those libraries in an interactive Python interpreter. So the libraries are actually installed. It just seems that Coc is not able to see them (?). Is this the expected behavior?

Thanks for figuring that out. I still think I have some issues with error handling, which is why everything failed until you fulfilled all the dependencies.

Regarding the LSP issue, I am honestly not sure what might be wrong, since this plugin will just launch neovim inside the container. Can you confirm that plugins are installed after you attach?

Also, I just remembered that CoC has a separate configuration that is not inside neovim directories. Is that still true? If so, you may need to add that as an additional mount point inside setup call.

require("devcontainer").setup {
 attach_mounts = {
 custom_mounts = {
 "type=bind,source=~/.config/coc,target=/root/.config/coc"
 }
 }
}

Of course the mount point above may be wrong if coc settings are located elsewhere.

Thanks for figuring that out. I still think I have some issues with error handling, which is why everything failed until you fulfilled all the dependencies. Regarding the LSP issue, I am honestly not sure what might be wrong, since this plugin will just launch neovim inside the container. Can you confirm that plugins are installed after you attach? Also, I just remembered that CoC has a separate configuration that is not inside neovim directories. Is that still true? If so, you may need to add that as an additional mount point inside `setup` call. ```lua require("devcontainer").setup { attach_mounts = { custom_mounts = { "type=bind,source=~/.config/coc,target=/root/.config/coc" } } } ``` Of course the mount point above may be wrong if coc settings are located elsewhere.

Can you confirm that plugins are installed after you attach?

Do you mean the NVim plugins like coc-pyright? Yes, those are installed.

I've actually tried to run :CocConfig and noticed that even if I didn't use the custom mount, the global settings I defined in ~/.config/nvim/coc-settings.json are loaded. I tried to change them and re-run the command and Coc is aware of the changes while running inside the devcontainer.

Just for reference, here is my current coc-settings.json. I stripped it down to the bare minimum just to ensure nothing else was getting in the way.

{
 "python.pythonPath": "/opt/conda/bin/python"
}

That python path location is the same location I get when loading in the devcontainer and running...

$ docker exec -it busy_chatterjee /bin/bash
root@101060dd4bb2:/workspace# which python
/opt/conda/bin/python
root@101060dd4bb2:/workspace# python
Python 3.8.12 | packaged by conda-forge | (default, Jan 30 2022, 23:42:07)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import timm
>>>

The last line of the above code block shows that, while inside the devcontainer, I am able to load the libraries that coc-pyright is not able to see.

Here is also the output to show that the python path for coc-pyright is set correctly.

:CocCommand workspace.showOutput Pyright
Workspace: /home/gianluca/git/kaggle/spine
Using python from /opt/conda/bin/python
[Info - 6:23:36 PM] Pyright language server 1.1.269 starting
[Info - 6:23:36 PM] Server root directory: /home/gianluca/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/
[Info - 6:23:36 PM] Starting service instance "spine"
[Info - 6:23:36 PM] No configuration file found.
[Info - 6:23:36 PM] No pyproject.toml file found.
[Info - 6:23:36 PM] Setting pythonPath for service "spine": "/opt/conda/bin/python"
[Warn - 6:23:36 PM] stubPath /home/gianluca/git/kaggle/spine/typings is not a valid directory.
[Info - 6:23:36 PM] Unable to get Python version from interpreter
[Info - 6:23:36 PM] Assuming Python platform Linux
[Info - 6:23:36 PM] Searching for source files
[Info - 6:23:36 PM] Found 22 source files

Another interesting thing is that it seems that coc-pyright is scanning for source files, so that is why it is able to recognize and jump to the definition of code living inside the src/ folder. But for some reasons, it is not able to see any of the libraries I've pip installed on the Python interpreter in /opt/conda/bin/python.

> Can you confirm that plugins are installed after you attach? Do you mean the NVim plugins like `coc-pyright`? Yes, those are installed. I've actually tried to run `:CocConfig` and noticed that even if I didn't use the custom mount, the global settings I defined in `~/.config/nvim/coc-settings.json` are loaded. I tried to change them and re-run the command and Coc is aware of the changes while running inside the devcontainer. Just for reference, here is my current `coc-settings.json`. I stripped it down to the bare minimum just to ensure nothing else was getting in the way. ``` { "python.pythonPath": "/opt/conda/bin/python" } ``` That python path location is the same location I get when loading in the devcontainer and running... ``` $ docker exec -it busy_chatterjee /bin/bash root@101060dd4bb2:/workspace# which python /opt/conda/bin/python root@101060dd4bb2:/workspace# python Python 3.8.12 | packaged by conda-forge | (default, Jan 30 2022, 23:42:07) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import timm >>> ``` The last line of the above code block shows that, while inside the devcontainer, I am able to load the libraries that `coc-pyright` is not able to see. Here is also the output to show that the python path for `coc-pyright` is set correctly. ``` :CocCommand workspace.showOutput Pyright Workspace: /home/gianluca/git/kaggle/spine Using python from /opt/conda/bin/python [Info - 6:23:36 PM] Pyright language server 1.1.269 starting [Info - 6:23:36 PM] Server root directory: /home/gianluca/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/ [Info - 6:23:36 PM] Starting service instance "spine" [Info - 6:23:36 PM] No configuration file found. [Info - 6:23:36 PM] No pyproject.toml file found. [Info - 6:23:36 PM] Setting pythonPath for service "spine": "/opt/conda/bin/python" [Warn - 6:23:36 PM] stubPath /home/gianluca/git/kaggle/spine/typings is not a valid directory. [Info - 6:23:36 PM] Unable to get Python version from interpreter [Info - 6:23:36 PM] Assuming Python platform Linux [Info - 6:23:36 PM] Searching for source files [Info - 6:23:36 PM] Found 22 source files ``` Another interesting thing is that it seems that `coc-pyright` is scanning for source files, so that is why it is able to recognize and jump to the definition of code living inside the `src/` folder. But for some reasons, it is not able to see any of the libraries I've pip installed on the Python interpreter in `/opt/conda/bin/python`.

I am not really sure what might be the issue. By default this plugin will mount your workspace directory and config (as you have noticed, your coc config was available already). I am not sure what else would be needed for pyright to work correctly.

I will try to figure out what might be the issue and I will let you know if I figure anything out.

I am not really sure what might be the issue. By default this plugin will mount your workspace directory and config (as you have noticed, your coc config was available already). I am not sure what else would be needed for pyright to work correctly. I will try to figure out what might be the issue and I will let you know if I figure anything out.

FYI, I've also replied to a similar topic on the coc-pyright GitHub issue tracker (here). Hopefully they will be able to help.

FYI, I've also replied to a similar topic on the `coc-pyright` GitHub issue tracker ([here](https://github.com/fannheyward/coc-pyright/issues/664#issuecomment-1233594351)). Hopefully they will be able to help.

Hi,

Unfortunately, I haven't been able to make much progress. I have a couple of questions though.

When trying to run a terminal command from inside nvim I noticed that I'm not inside the dev container.

:terminal pwd
/home/gianluca/git/kaggle/spine # instead of /workspace
:terminal which python
/usr/bin/python # instead of /opt/conda/bin/python

Even when using fzf inside nvim I can see files I didn't mount on the dev container. Similarly, coc-explorer also doesn't seem to be running from inside the dev container, as it also has access to files I didn't mount on the dev container.

Is that the expected behavior?

I generally run :DevcontainerBuildRunAttach to connect to a devcontainer. After 1 or 2 seconds nvim brings me back to the intro window, as if I just started nvim. I assumed that meant that I was inside the container, but maybe that's not the case?

Hi, Unfortunately, I haven't been able to make much progress. I have a couple of questions though. When trying to run a terminal command from inside nvim I noticed that I'm not inside the dev container. ``` :terminal pwd /home/gianluca/git/kaggle/spine # instead of /workspace :terminal which python /usr/bin/python # instead of /opt/conda/bin/python ``` Even when using fzf inside nvim I can see files I didn't mount on the dev container. Similarly, `coc-explorer` also doesn't seem to be running from inside the dev container, as it also has access to files I didn't mount on the dev container. Is that the expected behavior? I generally run `:DevcontainerBuildRunAttach` to connect to a devcontainer. After 1 or 2 seconds nvim brings me back to the intro window, as if I just started nvim. I assumed that meant that I was inside the container, but maybe that's not the case?

Hi,

So, the way attach works is a bit of a hack currently, until 0.8.0 remote TUI features land. Currently, when you run attach, terminal window is started with neovim running in it, meaning you get an interface to neovim inside the container in a terminal buffer. When running these commands, just make sure you are in terminal mode. That may be difficult to see, since plugin also hides command line to make it seem like it is not really a terminal window.

You can change this behavior by overriding terminal handler in setup function call.

Hi, So, the way attach works is a bit of a hack currently, until 0.8.0 remote TUI features land. Currently, when you run attach, terminal window is started with neovim running in it, meaning you get an interface to neovim inside the container in a terminal buffer. When running these commands, just make sure you are in terminal mode. That may be difficult to see, since plugin also hides command line to make it seem like it is not really a terminal window. You can change this behavior by overriding terminal handler in setup function call.

That makes sense! I'm looking forward to the remote TUI feature too. That seems exactly what we need. 0.8.0 should be here relatively soon it seems ― fingers crossed 🤞

BTW, I've switched from CoC to the native nvim LSP in the past few days and I'm seeing the same issue when using :DevcontainerBuildRunAttach. I think that's okay for now. Let's wait for the remote TUI to land and try again.

Thank you again for all the support and the work you put on this incredible plugin @esensar. I'm really super excited to replicate that part of my development workflow in nvim!

That makes sense! I'm looking forward to the remote TUI feature too. That seems exactly what we need. 0.8.0 should be here relatively soon it seems ― fingers crossed 🤞 BTW, I've switched from CoC to the native nvim LSP in the past few days and I'm seeing the same issue when using `:DevcontainerBuildRunAttach`. I think that's okay for now. Let's wait for the remote TUI to land and try again. Thank you again for all the support and the work you put on this incredible plugin @esensar. I'm really super excited to replicate that part of my development workflow in nvim!

Unfortunately, remote TUI was moved to 0.9.0, so we will have to wait a bit longer. Do you still have the issue reported here?

Unfortunately, remote TUI was moved to 0.9.0, so we will have to wait a bit longer. Do you still have the issue reported here?

Hi,

Apologies for the late reply. I started on a new job and didn't have much time to work on this.

I updated nvim-dev-container to the most recent version and can confirm I can build, run, and attach the devcontainer from inside neovim now.

My understanding is that to enable LSP functianalities I will have to install the LSP (e.g., pyright, lua-language-server) inside the devcontainer - in that correct?

Hi, Apologies for the late reply. I started on a new job and didn't have much time to work on this. I updated `nvim-dev-container` to the most recent version and can confirm I can build, run, and attach the devcontainer from inside `neovim` now. My understanding is that to enable LSP functianalities I will have to install the LSP (e.g., `pyright`, `lua-language-server`) inside the devcontainer - in that correct?

That is correct, everything is running inside the container, so LS has to be there too.

That is correct, everything is running inside the container, so LS has to be there too.

Alright! I've tried to install the nightly version of neovim and pyright inside the devcontainer. After executing :DevcontainerBuildAndRun and then :DevcontainerAttachAuto I'm presented with a new neovim intro screen, which I think means everything is good.

However, if I open any file (either using :e <filename> or Telescope), I think I'm back to my local neovim instance. For instance, I can use plugins I didn't install in the Docker container and the language server is not able to see Python dependencies that are installed in the Docker container.

Alright! I've tried to install the nightly version of `neovim` and `pyright` inside the devcontainer. After executing `:DevcontainerBuildAndRun` and then `:DevcontainerAttachAuto` I'm presented with a new neovim intro screen, which I think means everything is good. However, if I open any file (either using `:e <filename>` or Telescope), I think I'm back to my local neovim instance. For instance, I can use plugins I didn't install in the Docker container and the language server is not able to see Python dependencies that are installed in the Docker container.

Since it is in the embedded terminal, is it possible that you are not in terminal mode at that time?

This behavior will be weird like that until remote TUI gets implemented.

Since it is in the embedded terminal, is it possible that you are not in terminal mode at that time? This behavior will be weird like that until remote TUI gets implemented.

Running :DevcontainerAttachAuto gives:

Found docker compose file definition. Attaching to service: common-backend-1 
Error executing vim.schedule lua callback: ...vim-dev-container/lua/devcontainer/internal/executor.lua:24: docker-compose is not executable. Ensure it 
is properly installed and available on PATH 
stack traceback: 
 [C]: in function 'error' 
 ...vim-dev-container/lua/devcontainer/internal/executor.lua:24: in function 'ensure_executable' 
 ...t/nvim-dev-container/lua/devcontainer/docker-compose.lua:16: in function 'run_docker_compose' 
 ...t/nvim-dev-container/lua/devcontainer/docker-compose.lua:150: in function 'get_container_id' 
 ...r/start/nvim-dev-container/lua/devcontainer/commands.lua:438: in function 'attach_to_compose_service' 
 ...r/start/nvim-dev-container/lua/devcontainer/commands.lua:604: in function 'callback' 
 ...r/start/nvim-dev-container/lua/devcontainer/commands.lua:23: in function 'callback' 
 ...vim-dev-container/lua/devcontainer/config_file/parse.lua:49: in function 'invoke_callback' 
 ...vim-dev-container/lua/devcontainer/config_file/parse.lua:87: in function '' 
 vim/_editor.lua: in function <vim/_editor.lua:0> 

Versions:

  • Docker Compose version v2.16.0 (docker compose command is available and can be called from my terminal)
  • Lubuntu 22.04
  • NVIM v0.8.3
    Build type: RelWithDebInfo
    LuaJIT 2.1.0-beta3

devcontainer.json

This file is small because I just want to attach Vim to my running container. I am starting my containers by myself with my own scripts. I only need the "attach" functionality.

{
 "name": "common-demo",
 "service": "common-backend-1",
 "dockerComposeFile": "docker-compose.yaml",
}

:checkhealth


devcontainer: require("devcontainer.health").check()
========================================================================
## Neovim version
 - OK: Neovim version tested and supported: 0.8.3
## Required plugins
 - OK: Jsonc treesitter parser available. ABI version: 13
## External dependencies
 - OK: Docker version 23.0.1, build a5ee5b1
 - ERROR: docker-compose is not executable! It is required for full functionality of this plugin!

Question

Should I fill a separate issue? Is this a known problem? Or I just do something wrong?

### Running `:DevcontainerAttachAuto` gives: ```bash Found docker compose file definition. Attaching to service: common-backend-1 Error executing vim.schedule lua callback: ...vim-dev-container/lua/devcontainer/internal/executor.lua:24: docker-compose is not executable. Ensure it is properly installed and available on PATH stack traceback: [C]: in function 'error' ...vim-dev-container/lua/devcontainer/internal/executor.lua:24: in function 'ensure_executable' ...t/nvim-dev-container/lua/devcontainer/docker-compose.lua:16: in function 'run_docker_compose' ...t/nvim-dev-container/lua/devcontainer/docker-compose.lua:150: in function 'get_container_id' ...r/start/nvim-dev-container/lua/devcontainer/commands.lua:438: in function 'attach_to_compose_service' ...r/start/nvim-dev-container/lua/devcontainer/commands.lua:604: in function 'callback' ...r/start/nvim-dev-container/lua/devcontainer/commands.lua:23: in function 'callback' ...vim-dev-container/lua/devcontainer/config_file/parse.lua:49: in function 'invoke_callback' ...vim-dev-container/lua/devcontainer/config_file/parse.lua:87: in function '' vim/_editor.lua: in function <vim/_editor.lua:0> ``` ### Versions: - Docker Compose version v2.16.0 (`docker compose` command is available and can be called from my terminal) - Lubuntu 22.04 - NVIM v0.8.3 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 ### devcontainer.json This file is small because I just want to attach Vim to my running container. I am starting my containers by myself with my own scripts. I only need the "attach" functionality. ```json { "name": "common-demo", "service": "common-backend-1", "dockerComposeFile": "docker-compose.yaml", } ``` ### `:checkhealth` ```md devcontainer: require("devcontainer.health").check() ======================================================================== ## Neovim version - OK: Neovim version tested and supported: 0.8.3 ## Required plugins - OK: Jsonc treesitter parser available. ABI version: 13 ## External dependencies - OK: Docker version 23.0.1, build a5ee5b1 - ERROR: docker-compose is not executable! It is required for full functionality of this plugin! ``` ### Question Should I fill a separate issue? Is this a known problem? Or I just do something wrong?

Thank you for reporting this!

It would be good to report as a separate issue, since this would be good to handle.

In the meantime, you can set "compose_command" to "docker compose" in your setup (plugin only checks for "podman-compose" or "docker-compose" by default).

Thank you for reporting this! It would be good to report as a separate issue, since this would be good to handle. In the meantime, you can set "compose_command" to "docker compose" in your setup (plugin only checks for "podman-compose" or "docker-compose" by default).

I've been using nvim-dev-container on my projects and I am having issues that were mentioned in this thread. I am able to attach to nvim in the container (version is different from the one installed locally) but I am only able to edit local files. This makes it impossible to use any of the tools installed in the container.

You wrote:

just make sure you are in terminal mode

Can you shed some more light on that? How can I make sure that I am in terminal mode?

Thanks for creating this project, it has a great potential!

I've been using `nvim-dev-container` on my projects and I am having issues that were mentioned in this thread. I am able to attach to nvim in the container (version is different from the one installed locally) but I am only able to edit local files. This makes it impossible to use any of the tools installed in the container. You wrote: > just make sure you are in terminal mode Can you shed some more light on that? How can I make sure that I am in terminal mode? Thanks for creating this project, it has a great potential!

Thank you, I am hoping to further improve that experience.

Currently this plugin is attaching by running another neovim instance inside the container through embedded terminal in your current neovim instance, which can make it a bit weird when editing files if you are not sure if you are currently working in the local or remote instance. #30 should improve that, but I am not sure if I will be able to implement it properly any time soon.

Thank you, I am hoping to further improve that experience. Currently this plugin is attaching by running another neovim instance inside the container through embedded terminal in your current neovim instance, which can make it a bit weird when editing files if you are not sure if you are currently working in the local or remote instance. https://codeberg.org/esensar/nvim-dev-container/issues/30 should improve that, but I am not sure if I will be able to implement it properly any time soon.
Sign in to join this conversation.
No Branch/Tag specified
main
feature/netman-integration
improvement/container-api
0.2.0
0.1.1
0.1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
esensar/nvim-dev-container#78
Reference in a new issue
esensar/nvim-dev-container
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?