Skip to content
| Marketplace
Sign in
Visual Studio>Tools>PostgreSQL Grammar
PostgreSQL Grammar

PostgreSQL Grammar

Pablo León

|
570 installs
| (0) | Free
TextMate PostgreSQL Grammar Visual Studio extension. This extension provides syntax highlighting for `.psql` and `.pgsql` files.
Download

PostgreSQL VS Grammar

TextMate Grammar in Visual Studio

This project is a clone of the TextMate Grammar example by Mads Kristensen, which demonstrates how to include TextMate grammars in Visual Studio extensions. However, it has been modified to support PostgreSQL grammar.

The grammar syntax is sourced from this repository.

Motivation

Currently, .sql files are highlighted using MSSQL syntax by default. This can sometimes lead to incorrect syntax highlighting, especially when working with PostgreSQL-specific syntax.

For example:

Example 1 Example 2

To avoid this, I often rename my SQL files to use the .psql extension. However, doing so causes the syntax highlighting to be lost entirely.

Solution

Leverage the existing PostgreSQL TextMate Grammar to highligh .psql files in Visual Studio.

Example 3 Example 4

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