How to Use VS Code on Arch Linux

How to Use VS Code on Arch Linux

Visual Studio Code (VS Code) is a popular, open-source, and feature-rich code editor developed by Microsoft. It supports numerous programming languages, offers a wide array of extensions, and is highly customizable. Despite being built by Microsoft, VS Code is favored even in the most open-source-centric communities like Arch Linux users due to its performance, flexibility, and powerful tooling.

In this guide, we’ll walk through the complete process of installing and using VS Code on Arch Linux, along with tips on how to get the most out of it on your system.


Why Use VS Code on Arch Linux?

Arch Linux is known for its simplicity, rolling-release model, and user-centric philosophy. It gives users total control over what’s installed and how the system operates. Combining Arch with VS Code can provide an incredibly productive and customizable development environment.

Benefits of Using VS Code

  • Cross-platform support (Linux, Windows, macOS)
  • Built-in Git integration
  • Large extension ecosystem
  • Excellent language support via LSP
  • Customizable interface and keyboard shortcuts

Installing VS Code on Arch Linux

There are two main options when it comes to installing VS Code on Arch Linux:

1. Official Microsoft Build (code)

This is the version directly built by Microsoft, with telemetry enabled by default.

sudo pacman -S code

This package is available in the [community] repository, so you don’t need to add any additional sources.

2. Open Source Build (vscodium)

If you prefer an open-source alternative without telemetry, you can install VSCodium, which is the community-driven build of VS Code.

You can install vscodium-bin from the AUR (Arch User Repository):

yay -S vscodium-bin

Make sure you have an AUR helper like yay or paru installed.

Example for installing yay

sudo pacman -S yay

Launching VS Code

After installation, you can launch VS Code via:

  • Application launcher/menu

  • Terminal:

    code
    

    or

    vscodium
    

If you want to use code from any terminal location, ensure the path is added correctly to your $PATH. This is usually handled automatically during installation.


Installing Extensions

One of VS Code’s strongest features is its extension marketplace. You can install extensions directly from within the editor:

  1. Click on the Extensions icon on the sidebar (or press Ctrl+Shift+X)
  2. Search for the extension you need (e.g., Python, C++, Prettier)
  3. Click Install

Alternatively, use the command line:

code --install-extension <extension-id>

For example:

code --install-extension ms-python.python

If you’re using vscodium, the marketplace might not be enabled by default. You can enable the marketplace by configuring product.json, or use the Open VSX Registry, a FOSS alternative.


Configuring VS Code for Your Workflow

VS Code allows deep customization. Here are some common steps to personalize your setup:

1. Settings

Use Ctrl+, to open the Settings UI or edit the settings.json directly:

Ctrl+Shift+P → Preferences: Open Settings (JSON)

Popular settings:

{
  "editor.tabSize": 4,
  "editor.formatOnSave": true,
  "files.autoSave": "afterDelay",
  "terminal.integrated.shell.linux": "/bin/bash"
}

2. Themes

Install themes for better aesthetics:

  • One Dark Pro
  • Dracula
  • Monokai
  • Nord
code --install-extension zhuangtongfa.Material-theme

Terminal Integration

VS Code features a built-in terminal that can run Bash, Zsh, Fish, or any shell installed on your Arch Linux system.

To change the default shell:

"terminal.integrated.defaultProfile.linux": "zsh"

If you use oh-my-zsh, this can make your terminal experience seamless within the editor.


Git and Version Control

Git is deeply integrated into VS Code. If you have git installed:

sudo pacman -S git

Then within VS Code:

  • You can clone repositories, commit changes, push to remotes, and resolve merge conflicts using the GUI.
  • Press Ctrl+Shift+G to access the Source Control panel.

Useful Extensions for Developers on Arch Linux

Here’s a list of must-have extensions to improve your experience:

ExtensionPurpose
PythonLinting, formatting, debugging
PrettierCode formatting
ESLintJavaScript/TypeScript linting
DockerDocker integration and support
Remote - SSHConnect to remote development environments
Live ServerReal-time HTML/CSS/JS updates
Rust AnalyzerRust language support
Markdown All in OneMarkdown preview and formatting

Using Language Servers on Arch Linux

For enhanced code completion, go-to definition, and linting, you can use Language Server Protocol (LSP) extensions.

Install language servers using pacman or your package manager:

sudo pacman -S python-lsp-server
sudo pacman -S lua-language-server
sudo pacman -S rust-analyzer

Make sure your extensions are configured to use them, or set the paths manually in settings.json if necessary.


Remote Development and Containers

VS Code supports remote development via:

  • Remote SSH
  • Remote Containers
  • WSL (not applicable to Linux)

For example, to use remote SSH:

  1. Install the Remote - SSH extension.
  2. Press F1 → “Remote-SSH: Connect to Host”
  3. Enter the SSH command (e.g., user@192.168.1.10)

This is great for working on remote servers or Raspberry Pi setups directly from your Arch Linux machine.


Performance Optimization on Arch

If you’re running VS Code on a lightweight or older machine, consider these tips:

  • Disable unnecessary extensions

  • Turn off telemetry:

    "telemetry.enableTelemetry": false,
    "telemetry.enableCrashReporter": false
    
  • Use a lightweight theme (like “Quiet Light” or “Solarized Light”)

  • Lower file watcher limits if needed:

    echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
    

Troubleshooting Common Issues

1. Font Rendering Issues

If fonts look blurry or misaligned:

  • Try enabling font smoothing:

    "editor.fontLigatures": true,
    "editor.fontFamily": "'Fira Code', monospace"
    
  • Install Fira Code or JetBrains Mono via:

    sudo pacman -S ttf-fira-code
    

2. Wayland Compatibility

If you’re running Wayland (e.g., on GNOME or KDE):

You may encounter some visual glitches. Run VS Code with:

code --ozone-platform-hint=auto

Or set the environment variable permanently in .bashrc or .zshrc:

export OZONE_PLATFORM=wayland

Conclusion

VS Code on Arch Linux is a powerful combination for developers who value performance, customization, and open-source tools. Whether you prefer the official Microsoft version or the telemetry-free VSCodium build, VS Code provides a rich environment for almost any development stack.

With its strong extension ecosystem, built-in terminal, and remote development capabilities, VS Code fits neatly into the workflow of Arch users—whether you’re a Python enthusiast, web developer, or systems programmer.

By taking advantage of Arch’s rolling-release model and VS Code’s robust features, you can craft a modern and efficient development setup tailored exactly to your needs.