User Tools

Site Tools


config:vscode

This is an old revision of the document!


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
'

Codex Rate Limit Plugin

https://marketplace.visualstudio.com/items?itemName=xiangz19.codex-ratelimit
install from top toolbar:

ext install xiangz19.codex-ratelimit

Set refresh to 60 seconds. Default is 10 seconds.

Persistent Conf

Open Command Palette:
Ctrl+Shift+P
then:
Preferences: Open User Settings (JSON)
and paste the settings below.

{
    "window.restoreWindows": "preserve",
    "chat.restoreLastPanelSession": true,
    "terminal.integrated.persistentSessionReviveProcess": "onExitAndWindowClose",
    "files.hotExit": "onExitAndWindowClose",
    "workbench.editor.restoreViewState": true,
    "terminal.integrated.enablePersistentSessions": true,
    "workbench.colorTheme": "Dark 2026",    
}

For vscodium-web, to restore project windows/open files etc, link to the exact project file like:
https://vscodium-web.example.com/?workspace=/src/projects/something.code-workspace

SFTP extension for remote up/download of files:
https://marketplace.visualstudio.com/items?itemName=Natizyskunk.sftp
example config:

{
    "name": "remote-name",
    "host": "remote-hostname",
    "protocol": "sftp",
    "port": 22,
    "username": "root",
    "privateKeyPath": "/home/user/.ssh/id_rsa",
    "remotePath": "/var/www/htdocs",
    "uploadOnSave": false,
    "useTempFile": false,
    "openSsh": false
}

https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code
https://marketplace.visualstudio.com/items?itemName=long-kudo.vscode-claude-status

Claude code permissions

Claude Code applies permissions directly via .claude/settings.json or globally via ~/.claude/settings.json and these cannot be set by the model prompt or CLAUDE.md/AGENTS.md. VS Code adds a .claude/settings.json in the project whenever an action got approved or rejected.

It's a good idea to curate an allow list of safe commands it should use for projects or globally.

format of an allow list:

.claude/settings.json
{
  "permissions": {
    "allow": [
      "Bash(node -e \"console.log\\(require.resolve\\('jsdom'\\)\\)\")",
      "Bash(python3 -c \"import bs4\")",
      "Bash(python3)",
      "Bash(git diff *)",
      "Read(//dev/**)",
      "Read(//tmp/**)",
      "Bash(pip show *)",
      "Bash(curl)",
      "Bash(mount)",
      "WebSearch",
      "Bash(npm ls *)",
      "Bash(node -e \"console.log\\(*\\)\")",
    ],
    "additionalDirectories": [
      "/tmp"
    ]
  }
}

Note that the asterisk can be used anywhere in the setting and it matches any characters. Be mindful of multiple asterisks as anything would match between them. This is purely textual matching and is not command aware.

config/vscode.1781645982.txt.gz · Last modified: by Wuff