Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Atlas HCLNew to Visual Studio Code? Get it now.
Atlas HCL

Atlas HCL

Ariga

|
5,396 installs
| (8) | Free
Syntax highlighting and autocompletion for Atlas
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Atlas HCL Extension for Visual Studio Code

Twitter Discord

The Extension supports Auto Completion Schema, SQL Dialect, Referencing Qualified Tables, Linting.

How to Use the Plugin

By default, the plugin will recognize files with the name atlas.hcl.

Follow this file naming convention to help the plugin recognize the correct dialect:

  • MySQL and MariaDB: *.my.hcl
  • PostgreSQL: *.pg.hcl
  • SQLite: *.lt.hcl
  • ClickHouse: *.ch.hcl
  • SQL Server: *.ms.hcl
  • Redshift: *.rs.hcl
  • Spanner: *.sp.hcl
  • Snowflake: *.sf.hcl
  • Atlas' test files: *.test.hcl
  • Migrate plan files: *.plan.hcl

Features

Auto Completion Schema Resources

This refers to a feature that automatically suggests or completes the names of schema resources (e.g. tables, columns, etc.) as the user types, based on the database dialect being used. For a comprehensive list of the supported resources, please visit the following link: https://atlasgo.io/atlas-schema/sql-resources.

Syntax Highlighting

This refers to a feature that highlights syntax in a file based on the HashiCorp Configuration Language (HCL) syntax

Referencing Qualified tables

This refers to a feature that allows for referencing tables and their columns in a structured manner, either relative to the current location (e.g. column.id) or absolute to the table (e.g. table.user.column.id).

Linting

The tool provides linting capabilities, including duplicate resources/attributes, required attributes, and resource hierarchy validation.

Configuration

Module Paths

Configure paths to Atlas modules for cross-module references. This feature allows schema files to reference schema definitions outside their immediate directory scope.

To configure module paths:

  1. Open VS Code Settings (Ctrl/Cmd + ,)
  2. Search for "Atlas"
  3. Find the Mod Paths setting (atlas.modPaths)
  4. Add the absolute paths to directories that should be treated as module roots

How it works:

  • By default, schema files can only reference resources within their current directory
  • Adding a parent directory as a module path allows files in subdirectories to reference each other
  • For example, with a structure like:
    /home/user/projects/atlas-project
      ├── schema.hcl
      ├── tables/
      │   └── users.hcl
      └── views/
          └── user_views.hcl
    
  • Adding /home/user/projects/atlas-project as a module path enables views/user_views.hcl to reference resources defined in tables/users.hcl or schema.hcl

This configuration is particularly useful in large projects with schema definitions split across multiple directories for better organization.

Support

Need help? File issues on the Atlas Issue Tracker or join our Discord server.

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