Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Sight - Stata Language ServerNew to Visual Studio Code? Get it now.
Sight - Stata Language Server

Sight - Stata Language Server

Jonathan.Bearak

|
210 installs
| (0) | Free
Stata language support: language server, syntax highlighting, and code execution
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Sight

Sight is a static analyzer and language server for Stata, built for VS Code. It resolves what's in scope at each line — catching undefined macros and used-before-defined references within a script and across do/run/include chains, without running your code — and surfaces that as real-time diagnostics, completions, go-to-definition, and find-references as you type. It also runs your code in Stata and ships built-in viewers for datasets, logs, and help files.

Features

  • Real-time Diagnostics: Catch undefined macros and other issues as you type
  • Intelligent Completions: Context-aware completions for commands, options, macros, and variables
  • Go-to-Definition: Jump to definitions of local/global macros and programs across the workspace
  • Find References: Locate every use of a macro, program, or variable across related files
  • Run Code in Stata: Execute code in the Stata application or terminal with intelligent statement detection and working directory management
  • Syntax Highlighting: Rich highlighting with nesting depth colors for compound strings and nested macros
  • Auto-Closing Pairs: Intelligently handles Stata's unique conventions for nested macros and compound strings
  • Cross-File Awareness: Symbol resolution across do/run/include chains with position-aware scope. Works automatically for most projects; some edge cases (e.g., dynamic macro paths or files outside the workspace) require manual configuration.
  • Declaration Directives: Suppress diagnostics for dynamically-created symbols (@lsp-local, @lsp-global)
  • Document Outline: Hierarchical code navigation with programs, macros, variables, and code sections
  • Workspace Symbols: Search for symbols across the entire workspace
  • Data Browser: Open .dta files directly in VS Code, or call vview from Stata to send the current dataset to the editor — features a virtualized grid with column resizing/hiding and value labels
  • Log Viewer: Render Stata .smcl log files with formatted output directly in VS Code
  • Help Viewer: Read Stata .sthlp help files directly in VS Code with clickable help-topic links

Screenshots

Real-time diagnostics Undefined local macro diagnostic
Intelligent completions Command completion popup Macro completion popup
Run code in Stata Send to Stata menu
Syntax highlighting with nesting depth colors Syntax highlighting with nesting depth colors

Installation

Search for "Sight" in the extension marketplace and click Install, or download the extension from Releases.

Documentation

For full documentation, configuration options, and LSP directives, see the full documentation on GitHub.

License

Copyright (c) 2026 Jonathan Marc Bearak. Licensed under GPLv3.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft