Skip to content
Andrei Montchik edited this page Sep 18, 2025 · 22 revisions

Install

Configure

  1. Linux: make sure that the "Fractional Scaling" is disabled in Displays configuration, otherwise fonts might be blury.
  2. Create or replace the settings.json file contents with the following. File location:
    • Linux: ~/.config/Code/User/
    • MacOS: /Users/andrei/Library/Application Support/Code/User/
{
    "workbench.colorTheme": "Default Light+",
    "workbench.colorCustomizations": {
        "editor.lineHighlightBackground": "#F3EFEE",
        "editor.background": "#FFFFFF",  // Set to white for a lighter background
        "editor.foreground": "#000000"
    },
    "editor.rulers": [],
    "editor.hover.delay": 2000,
    "editor.fontFamily": "'Fira Code', monospace",
    "editor.fontLigatures": true,
    "editor.fontWeight": "400",
    "editor.fontSize": 14,
    "editor.formatOnSave": true,
    "git.enableSmartCommit": true,
    "git.confirmSync": false,
    "terminal.integrated.fontWeight": "normal",
    "terminal.integrated.fontFamily": "Courier New",
}
  1. Restart VSCode.

Support Rust

Install and configure Rust extensions

  • Install the rust-analyzer extension to support Rust.
  • Install the CODELLDB plugin for debugging.
  • Enable imports formatting:
    1. Switch to the nightly rust: rustup default nightly
    2. Create or replace the rustfmt.toml file in the root project directory with the following:
      imports_granularity = "One"
      group_imports = "One"
      use_field_init_shorthand = true
      
      # Maximum line length
      max_width=105
      
    3. Add the following to the Global ~/.config/Code/User/settings.json.
      "rust-analyzer.rustfmt.extraArgs": ["+nightly"]
      
    4. Restart VSCode.

Debug Rust library

Create Launch configuration to run application that uses the library. Example:

   {
     "type": "lldb",
     "request": "launch",
     "name": "Debug Test Validator",
     "program": "solana-test-validator",
     "args": [
        "--geyser-plugin-config",
        "/home/andrei/.config/solana/plugin_config.localnet.json"
     ],
     "cwd": "/home/andrei/work/playground",
     "sourceLanguages": [
         "rust"
     ],
   }

Clone this wiki locally