Files
homelab/.vscode/vscode.md
ducoterra 7b93f740ec
Some checks failed
Reese's Arch Toolbox / build-and-push-arch-toolbox (push) Failing after 2m40s
Podman DDNS Image / build-and-push-ddns (push) Failing after 5s
wyoming updates, borg manual, fedora kscreen, bambu wifi, vscode pylance, stable diffusion
2025-05-23 13:49:03 -04:00

2.6 KiB

VSCODE Configuration

Debugpy Snippet

Use this to add debugging to any project

# Listens on 5678
# Only runs if ACTIVATE_DEBUGPY=true is set
if os.getenv("ACTIVATE_DEBUGPY", "").lower() == "true":
    try:
        import debugpy
        debugpy.listen(("0.0.0.0", 5678))
        print("Waiting for client on 5678...")
        debugpy.wait_for_client()
        print("Client connected")
    except Exception as e:
        print("DEBUG ERROR: " + str(e))

Fix Paste (if ctrl+v not working)

Add to user keyboard settings (json)

  {
    "key": "ctrl+v",
    "command": "-editor.action.clipboardPasteAction"
  },

Shell

I would recommend using tmux as your default shell. VSCode automatically creates new sessions when adding or splitting windows. The only small problem is closing out of vscode and reopening it won't reattach the previous sessions. You'll need to run tmux switch-client -t # to get back to each session you lost.

"terminal.integrated.profiles.osx": {
  //...existing profiles...
  "tmux-shell": {
    "path": "tmux",
  }
}
{
    "terminal.integrated.defaultProfile.linux": "tmux",
}

Fonts

Intel One Mono is designed to be easily readable for developers.

https://github.com/intel/intel-one-mono

Download and extract the ttf.zip

mkdir ~/.local/share/fonts
rsync -av /path/to/download/*.ttf ~/.local/share/fonts/

Edit settings.json

{
    "editor.fontFamily": "Intel One Mono",
    "editor.fontLigatures": true,
    "terminal.integrated.fontFamily": "Intel One Mono",
}

Navigation

The best navigation shortcut ever is alt+left and alt+right to move the cursor to it's previous positions.

[
    {
        "key": "alt+left",
        "command": "workbench.action.navigateBack",
        "when": ""
    },
    {
        "key": "alt+right",
        "command": "workbench.action.navigateForward",
        "when": ""
    }
]

Extensions

To save a list of installed extensions run:

code --list-extensions >> vscode_extensions.txt

To install that list of extensions run:

cat vscode_extensions.txt | xargs -L 1 code --install-extension

Continue

Continue -> Settings -> Help -> Quickstart

Pylance Type Checking

Settings -> python.analysis.typeChecking