Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Effect-TS/tsgo/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have:- Node.js 18 or later
- npm, pnpm, or yarn
- An existing TypeScript project that uses Effect (V3 or V4)
- A
tsconfig.jsonat the project root (or a known path)
You do not need to install
@typescript/native-preview before running setup — the wizard will guide you through any additional steps.Installation
Run the setup wizard
From your project root, run:The interactive wizard walks you through each step of the setup:
- npx
- pnpm
- yarn
- Select your
tsconfig.json— the wizard detectstsconfig.jsonfiles in your project and lets you pick the right one. - Add
@effect/tsgoas a dependency — installs the package into your project’spackage.json. - Configure the tsconfig plugin — adds the
@effect/language-serviceplugin entry tocompilerOptions.pluginsin your selectedtsconfig.json. - Adjust diagnostic options — lets you set initial severity preferences for individual rules.
- Editor hints — prints instructions for any additional editor configuration needed to activate the LSP.
Review your tsconfig.json
After the wizard completes, your You can adjust these options at any time. See the Plugin options reference for the full list.
tsconfig.json will have a plugin entry similar to this:Install the editor binary
The wizard installs the npm package, but your editor needs access to the compiled This replaces the
effect-tsgo binary. Patch the @typescript/native-preview binary (which your editor likely already uses) by running:tsgo binary inside @typescript/native-preview with the effect-tsgo binary and creates a backup of the original so you can restore it at any time.Configure your editor
Point your editor’s TypeScript language server at the
effect-tsgo binary. The exact configuration depends on your editor:- VS Code — see the VS Code setup section
- Neovim — see the Neovim setup section
- Other editors — see the Other editors section
Verify it works
Open any
.ts file that uses Effect. You should see:- Diagnostics — red/yellow underlines for Effect-specific issues like floating effects or missing
yield* - Quick fixes — a lightbulb or code action menu offering one-click fixes
- Completions —
Effect.gen, Schema class, and directive snippets in autocomplete
Configure diagnostic severities
After the initial setup, you can adjust which rules are active and at what severity level using the interactive config command:tsconfig.json so you can enable, disable, or change the severity of individual diagnostics without editing JSON manually.
Next steps
Editor setup
Complete editor-specific configuration for VS Code, Neovim, and more.
Plugin options
Explore all available tsconfig plugin options.
Diagnostics overview
Browse all 50+ Effect-specific diagnostics and their default severities.
Refactors
Discover available code refactors and how to trigger them.