LangSync

VS Code Extension

Surface missing, extra, and empty translations directly in your editor.

The LangSync VS Code extension brings locale validation into your editor. It runs the same checks as langsync validate, in-process, and reports missing, extra, and empty translation keys as native VS Code diagnostics while you work.

The extension is in active development. Phase 1 (described here) covers locale-aware diagnostics and the validate workflow. Editor intelligence (autocomplete, hover, go-to-definition) is planned for a later phase.

Installation

The extension is not yet on the Visual Studio Marketplace or Open VSX. Until it is published, install it from a locally built .vsix package:

# From the repository root
pnpm install
pnpm --filter langsync-vscode package

This produces packages/vscode-extension/langsync-<version>.vsix. Install it in VS Code with:

code --install-extension packages/vscode-extension/langsync-<version>.vsix

You can also install it from the Extensions view: open the ... menu and choose Install from VSIX....

Activation

The extension activates only when a workspace folder contains a LangSync config file (langsync.config.{ts,js,mjs,json}, .langsyncrc, or .langsyncrc.json). Workspaces without LangSync are unaffected.

Multi-root workspaces are supported: each folder with a LangSync config is validated independently, with its own diagnostics.

Diagnostics

Locale files are validated automatically when opened and saved, and whenever a config or locale change is detected. Issues appear in the Problems panel and inline at the relevant JSON key:

Issue typeDefault severityMeaning
missingErrorA key from the reference locale is absent.
extraWarningA key exists that is not in the reference locale.
emptyInformationA key is present but its translation is empty.

Missing keys are reported at the top of the affected file (the key does not yet exist to point at); extra and empty keys are highlighted at the exact key.

Commands

Run these from the Command Palette:

CommandAction
LangSync: ValidateRe-validate every configured workspace root.
LangSync: SyncSync the active project's locales, then revalidate.
LangSync: Find MissingReport missing keys for the active project.
LangSync: Open ConfigOpen the LangSync config for the active project.

Status bar

A status bar item summarizes the current state across all configured roots:

  • $(check) LangSync — all locale files are consistent.
  • $(warning) LangSync: N issues — aggregate issue count; click to open the Problems panel.
  • $(sync~spin) LangSync — validation in progress.

Settings

SettingDefaultDescription
langsync.autoValidateOnSavetrueValidate locale files when they are saved.
langsync.autoValidateOnOpentrueValidate locale files when they are opened.
langsync.diagnosticSeverity.emptyinformationSeverity for empty translations. Use none to disable empty diagnostics.
langsync.configPathnullPath to a config file, relative to the workspace folder. Its directory is used as the validation working directory. Useful for monorepos with ambiguous discovery.

On this page