Skip to content

Type to search extensions

Postgres Language Server

v0.1.1

Postgres Language Server

Updated 2 weeks ago
61k downloads 18 stars Repository ↗

Postgres Language Server for Zed

To install navigate to: Zed > Extensions. Or use the command palette (macOS, Linux) to search extensions.

This extension integrates the Postgresql Language Server.

Project Setup

Syntax diagnostics and linting work without any configuration. Autocomplete, hover, and type checking need a database connection, which you configure in a postgres-language-server.jsonc file at the root of your project.

1. Create postgres-language-server.jsonc at the project root

{
  "$schema": "https://pg-language-server.com/latest/schema.json",
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true
    }
  },
  "db": {
    "host": "127.0.0.1",
    "port": 5432,
    "username": "postgres",
    "password": "postgres",
    "database": "postgres",
    "connTimeoutSecs": 10,
    "allowStatementExecutionsAgainst": ["127.0.0.1/*", "localhost/*"]
  }
}

Replace the values under db with your own connection details. Use the discrete fields shown above.

2. Reload Zed

Reopen the workspace (or restart Zed) so the language server picks up the new configuration.

For the full configuration reference (linter rules, formatter, type checking, etc.) see the upstream Postgres Language Server documentation.

ZedExt An unofficial community project. Not affiliated with Zed Industries.

Data from Zed’s extension registry and GitHub · updated