WhatschatDocsProgramming
Related
Navigating the Python 3.15.0a5 Preview: A Developer's How-To GuideOpenAI Codex 'For Almost Everything' Update Transforms Developer Workflow, Early Tests Show Rapid Bug FixesMicrosoft Releases Agent Governance Toolkit for .NET to Secure MCP-Based AI AgentsPython's Flexibility Comes at a Cost: Standalone App Bundling Remains a Persistent ChallengeGo 1.26 Overhauls `go fix` Tool: Automated Code Modernization Now AvailableAutomating Intellectual Toil: How Agent-Driven Development Transformed Copilot Applied ScienceWhat's New in Go 1.26? A Comprehensive Q&AHow to Implement Immutable Admission Policies in Kubernetes v1.36 Using Manifest Files

VS Code Python Extension Update: Enhanced Code Navigation and Faster Indexing (March 2026)

Last updated: 2026-05-14 19:26:29 · Programming

Navigating unfamiliar codebases or exploring third-party libraries often requires jumping between your editor and external documentation. The March 2026 release of the Python extension for Visual Studio Code addresses this by extending Pylance's workspace symbol search to include symbols from packages installed in your active virtual environment. Previously limited to your workspace files, this feature now lets you quickly locate functions, classes, and other symbols defined in site-packages without leaving VS Code.

VS Code Python Extension Update: Enhanced Code Navigation and Faster Indexing (March 2026)
Source: devblogs.microsoft.com

How It Works

When enabled, the Python › Analysis: Include Venv In Workspace Symbols setting instructs Pylance to index symbols from the active virtual environment's site-packages directory. This means a quick Cmd/Ctrl+T can surface definitions from libraries like NumPy or Flask as if they were part of your project. To keep results focused, the indexer only includes symbols exported via __init__.py or __all__ for packages without py.typed annotations. You can further fine-tune indexing depth per package using the Python › Analysis: Package Index Depths setting, controlling how many sub-module levels Pylance searches.

Enabling the Feature

Because indexing installed packages can impact performance, this is an opt-in feature. To try it:

  1. Open Settings (Cmd+, on macOS or Ctrl+, on Windows/Linux)
  2. Search for "Include Venv In Workspace Symbols"
  3. Check the box under Python › Analysis

Once enabled, you'll immediately notice richer code exploration when working with third-party dependencies, while the default experience remains unchanged for others.

Experimental Rust-Based Parallel Indexer

Behind the scenes, Pylance's indexing engine—responsible for completions, auto-imports, and workspace symbol search—receives a major experimental upgrade. The March 2026 release introduces a new Rust-based parallel indexer that runs out-of-process, replacing the previous single-threaded implementation. In internal tests, this indexer achieves an average 10× speed improvement on large Python projects, resulting in faster completions after workspace open and a more responsive IntelliSense experience.

VS Code Python Extension Update: Enhanced Code Navigation and Faster Indexing (March 2026)
Source: devblogs.microsoft.com

Performance Gains

The new indexer parses and indexes code in parallel, leveraging Rust's efficiency to handle complex project structures without blocking the editor. Early benchmarks show significant reductions in indexing time for projects with hundreds of files and deep dependency trees. Small projects may see minimal difference, but for large codebases, the improvement can be transformative.

How to Enable

This is intentionally experimental; the team wants to validate reliability across diverse environments before making it the default. To activate it:

  • Open Settings (Cmd+, / Ctrl+,)
  • Search for "Parallel Indexing"
  • Check Enable Parallel Indexing (Experimental) under Python › Analysis

Alternatively, add the following to your settings.json:

"python.analysis.enableParallelIndexing": true

After enabling, reload VS Code (Cmd/Ctrl+Shift+PReload Window) to start the new indexer cleanly. This setting has the most impact on larger projects.

We Want Your Feedback

If you try the new indexer, share your experience. Whether you observe faster completions, slower behavior, or unexpected issues, your input will help shape the final implementation. Check the full list of improvements in the Python and Pylance changelogs.