Karol Krzosa ed33df2c16 Fix comma
2026-02-16 17:49:58 +01:00
2026-02-16 13:46:18 +01:00
2026-02-16 17:49:38 +01:00
2026-02-16 13:46:18 +01:00
2026-02-16 13:46:18 +01:00
2026-02-16 17:49:58 +01:00
2026-02-16 14:06:54 +01:00
2026-02-16 13:46:18 +01:00

vsctags

Use a ctags file to power code navigation in VS Code. No new keybindings — plugs directly into the built-in Go to Definition, symbols, hover, and references systems.

Features

Feature Shortcut How it works
Go to Definition F12 / Cmd+Click Jumps to the tag's source location
Peek Definition Alt+F12 Inline peek at the definition
Go to Symbol in Workspace Cmd+T Search all tags by name
Go to Symbol in File Cmd+Shift+O List tags in the current file
Find References Shift+F12 Show all tag entries for a symbol
Hover Mouse hover Shows tag kind, file, line, and scope

Setup

  1. Install Universal Ctags

    # macOS
    brew install universal-ctags
    
    # Ubuntu/Debian
    sudo apt install universal-ctags
    
  2. Generate a tags file in your project root:

    ctags -R --fields=+lKSn --extras=+q .
    
  3. Open the folder in VS Code. The extension activates automatically and loads the tags.

How it works

  • On activation, reads the tags file from the workspace root
  • Watches the file for changes and reloads automatically
  • Pattern-based line numbers (/^...$/) are resolved lazily on first navigation, not at load time
  • Source file contents are cached after first read to avoid redundant I/O

Optimized for large codebases

Designed to handle 1,000,000+ symbols efficiently:

  • Streaming parser — reads the tags file line-by-line instead of loading it all into memory
  • Sorted index + binary search — workspace symbol search (Cmd+T) uses O(log n) prefix matching
  • File index — document symbols are O(1) lookup by file path, not a linear scan
  • Pre-cached lowercase names — no per-query toLowerCase() on every entry
  • Lazy pattern resolution — line numbers from patterns are resolved on-demand with file caching
  • Lightweight entries — minimal per-entry memory footprint

Commands

  • vsctags: Reload Tags — manually reload the tags file
  • vsctags: Show Log — open the output channel with detailed timing and diagnostics

Remote SSH

Works over VS Code Remote SSH. The extension runs on the remote machine where the tags file and source code live.

Requirements

  • A tags file in the workspace root (generated by Universal Ctags or compatible)
  • Universal Ctags recommended (the BSD ctags shipped with macOS does not support -R)

Release Notes

0.0.1

Initial release — ctags-powered Go to Definition, symbols, hover, references, with streaming parser and lazy resolution.

Description
Use a ctags file to power code navigation in VS Code.
Readme 144 KiB
Languages
TypeScript 98.1%
JavaScript 1.9%