https://github.com/supabase-community/postgres-language-server
A Language Server for Postgres
https://github.com/supabase-community/postgres-language-server
language-server-protocol postgres
Last synced: 7 days ago
JSON representation
A Language Server for Postgres
- Host: GitHub
- URL: https://github.com/supabase-community/postgres-language-server
- Owner: supabase-community
- License: mit
- Created: 2023-05-17T19:23:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-19T20:07:53.000Z (10 days ago)
- Last Synced: 2025-04-20T16:25:27.074Z (9 days ago)
- Topics: language-server-protocol, postgres
- Language: Rust
- Homepage: https://pgtools.dev/
- Size: 9.78 MB
- Stars: 4,902
- Watchers: 35
- Forks: 98
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - supabase-community/postgres-language-server - A Language Server for Postgres (Rust)
- awesome-starred - supabase-community/postgres-language-server - A Language Server for Postgres (Rust)
README

# Postgres Language Server
A collection of language tools and a Language Server Protocol (LSP) implementation for Postgres, focusing on developer experience and reliable SQL tooling.
Docs: [pgtools.dev](https://pgtools.dev/)
Install: [instructions](https://pgtools.dev/#installation)
- [CLI releases](https://github.com/supabase-community/postgres-language-server/releases)
- [VSCode](https://marketplace.visualstudio.com/items?itemName=Supabase.postgrestools)
- [Neovim](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#postgres_lsp)
- [Zed](https://github.com/LoamStudios/zed-postgres-language-server)## Overview
LSP Demo | CLI Demo
:-------------------------:|:-------------------------:
 | This project provides a toolchain for Postgres development, built on Postgres' own parser `libpg_query` to ensure 100% syntax compatibility. It is built on a Server-Client architecture with a transport-agnostic design. This means all features can be accessed not only through the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), but also through other interfaces like a CLI, HTTP APIs, or a WebAssembly module. The goal is to make all the great Postgres tooling out there as accessible as possible, and to build anything that is missing ourselves.
The following features are implemented:
- Autocompletion
- Syntax Error Highlighting
- Type-checking (via `EXPLAIN` error insights)
- Linter, inspired by [Squawk](https://squawkhq.com)Our current focus is on refining and enhancing these core features while building a robust and easily accessible infrastructure. For future plans and opportunities to contribute, please check out the issues and discussions. Any contributions are welcome!
## Contributors
- [psteinroe](https://github.com/psteinroe)
- [juleswritescode](https://github.com/juleswritescode)## Acknowledgements
A big thanks to the following projects, without which this project wouldn't have been possible:
- [libpg_query](https://github.com/pganalyze/libpg_query): For extracting the Postgres' parser
- [Biome](https://github.com/biomejs/biome): For implementing a toolchain infrastructure we could copy from
- [Squawk](https://github.com/sbdchd/squawk): For the linter inspiration