Skip to content

Editor Features

smelt's Language Server Protocol (LSP) implementation brings the kind of editor experience you'd expect from a statically-typed language to your data pipeline. Every feature works in real time as you type -- no build step, no waiting.

Setup first

If you haven't configured the LSP yet, see Editor Setup to get started.

Real-Time Diagnostics

Catch errors the moment you make them, not minutes later when a pipeline run fails.

smelt validates your SQL continuously: undefined model references, undeclared columns, type mismatches, and parse errors all surface as you type. In dbt, a typo in a ref() call means a failed build. In smelt, it's a red squiggle before you finish the line.

Typo caught instantly

The diagnostics cover the full range of common errors:

  • Undefined refs -- referencing a model that doesn't exist
  • Undeclared columns -- using a column name not present in the upstream schema or sources.yml
  • Parse errors -- SQL syntax mistakes
  • Type mismatches -- operations on incompatible types

Clean pipeline with no errors

Undeclared column caught at edit time

Go-to-Definition

Trace your data lineage by jumping directly to definitions -- from a smelt.ref() call to the upstream model, from a column reference to where it's defined, or from a CTE usage to its definition.

In a large pipeline with dozens of models, you can follow the data flow without ever leaving your editor. No more grepping for model names or manually opening files.

Trace through the pipeline

Go-to-definition works for:

Cursor position Jumps to
smelt.ref('model_name') The referenced model's SQL file
smelt.source('schema.table') The table entry in sources.yml
CTE name in FROM/JOIN The CTE definition in the WITH clause
Table alias (e.g., t in t.column) Where the alias is defined
Column reference The column's definition in the upstream SELECT or sources.yml

Jump to CTE definition

Hover Information

Hover over any model reference, source, or CTE to see its full schema -- column names, types, and where the data comes from.

This is particularly useful when writing joins or aggregations: you can quickly check what columns are available without switching files.

Model schema on hover

Upstream schema lineage

Source schema on hover

Code Completion

Build queries faster with context-aware completions. smelt suggests model names inside smelt.ref(), source names inside smelt.source(), and column names when you're writing SELECT lists or WHERE clauses.

Completions are schema-aware: they know what columns each upstream model exposes, so you get accurate suggestions as you type.

Build a query with completions

Model name completions

Find References

Answer "who uses this model?" with a single keystroke. Find References shows every downstream consumer of a model or every usage of a CTE within a file.

In dbt, discovering downstream impact means grepping the codebase for ref('model_name'). In smelt, it's built into the editor.

Find model consumers

Find CTE references

Rename Refactoring

Rename a model and have every reference across the project update automatically. The LSP shows a preview of all changes before applying them, so you can review the impact.

This works for model names inside smelt.ref() calls across all files in the project.

Rename model across project

Rename preview

Code Actions & Quick Fixes

When smelt detects an error, it often suggests a fix. The most useful code action: if you reference a model that doesn't exist yet, smelt offers to create the SQL file for you.

Create model from ref

Create model quickfix