microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.67k stars 291 forks source link

Borken dotfiles config #6205

Open gparmeggiani opened 2 years ago

gparmeggiani commented 2 years ago

I'm following the steps described here: https://code.visualstudio.com/docs/remote/containers#_personalizing-with-dotfile-repositories

However the settings related to dotfiles are no longer part of the "User" group of settings, but instead are part of the "Remote" part of the setting. This causes them to be stored inside the devcontainer (/root/.vscode-server/data/Machine/settings.json in my case). This means that every time I rebuild the container those settings are flushed.

dotfiles support was working fine in the past, when it was possible to add the settings in the user settings.json. Now those settings are grayed out: image

Chuxel commented 2 years ago

Odd - @sandy081 @chrmarti ?

gparmeggiani commented 2 years ago

I'm using the "remote.containers.executeInWSL": true, setting, if that makes a difference

gparmeggiani commented 2 years ago

Using "dotfiles.repository.*" instead of "remote.containers.dotfiles.repository.*" in the User's settings.json causes the dotfiles repo to be cloned and the command executed.

However those settings are still grayed out in the json and NOT visible the the settings GUI.

chrmarti commented 2 years ago

I made them machine-scoped, which is probably wrong. Try disconnecting from Remote-WSL and Remote-Containers and check in the settings UI again (as a workaround).

hillelme commented 1 year ago

same here. not seeing dotfiles being loaded. this worked until a month ago (though sometimes needed to rebuild container or open/close terminal a few times to get it to work) as said above seeing the options greyed out. if I disconnect from remote they are not, but then when I reconnect/rebuild nothing happens.

    "dotfiles.repository": "https://github....../dotfiles",
    "dotfiles.targetPath": "~/dotfiles",
    "dotfiles.installCommand": "~/dotfiles/install.sh"
jmdfm commented 1 year ago

The ability to edit the settings with the UI is definitely broken while the editor is connected to a remote container.. I just now followed the official instructions here and the settings do not show up when you go to the settings page.

Manually placing the settings in your settings.json shows as configuration errors.

Rebuilding the container does do the correct thing, pulling down the dotfiles etc.

hillelme commented 1 year ago

we ended up with this little snippet, that we run whenever we rebuild the container: cd ~ && git clone git@github.com:MY_NAME/dotfiles.git && cd dotfiles && . install.sh it's a bit of a hassle, but it's still one click. 🤷‍♀️

zer0guz commented 1 year ago

i also cannot get my dotfiles repo to clone or even show up in the logs

jmdfm commented 1 year ago

Have you put the dotfile settings in your main settings.json? They don't work at all if you have them in devcontainer.json, which is crazy. But it is what it is.

zer0guz commented 1 year ago

Yea I have put it in the main settings.json The problem is with that setting activated the container gets built and started successfully, the extensions and I also think the features get installed correctly but then it hangs at configuring devcontainer for ever… if I click on show log, the output is blank… it’s the process with pid1.. haven’t seen anything relating to this in the devtools console either