User Tools

Site Tools


config:vscode

VS Code

This article describes the installation and basic configuration for Microsoft Visual Studio Code including Python and OpenAI Codex support.

sudo apt-get install wget gpg && wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg && sudo install -D -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/microsoft.gpg && rm -f microsoft.gpg

sudo tee /etc/apt/sources.list.d/vscode.sources &>/dev/null <<EOF
Types: deb
URIs: https://packages.microsoft.com/repos/code
Suites: stable
Components: main
Architectures: amd64,arm64,armhf
Signed-By: /usr/share/keyrings/microsoft.gpg
EOF

sudo apt install apt-transport-https && sudo apt update && sudo apt install code
sudo apt-get install gvfs libglib2.0-bin

sudo tee -a /etc/sysctl.conf &>/dev/null <<EOF
fs.inotify.max_user_watches=524288
EOF

sudo sysctl -p

Disable the internal AI features and telemetry:

  • Settings → Chat → Disable AI Features
  • Settings → telemetry.telemetryLevel → Off
  • Settings → application → update → update:mode → None (as updated through apt)

Marketplace addons/plugins/extensions:

Keyboard shortcut changes (CTRL+K CTRL+S):

  • Copy Line Down → CTRL + D

Note: To authenticate the ChatGPT/Codex plugin within VS Code Server docker image, the following needs to be done on the docker main system. The codex binary is in the plugin version's directory and vscode runs under user abc. For this to work, the device auth needs to be enabled in chatgpt codex security settings:

docker exec -it -u abc vscode sh -lc '
CODEX_BIN="$(find /config/extensions -path "*/bin/linux-x86_64/codex" | head -n1)"
"$CODEX_BIN" login --device-auth
'
config/vscode.txt · Last modified: by Wuff