Skip to content

Commit e004a56

Browse files
committed
chore: readme
1 parent a836f91 commit e004a56

File tree

1 file changed

+15
-39
lines changed

1 file changed

+15
-39
lines changed

README.md

Lines changed: 15 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,24 @@ A Language Server for Postgres. Not SQL with flavors, just Postgres.
66

77
## Status
88

9-
🚧 This is in active development and is only ready for collaborators. The majority of work is still ahead, but we've verified that the approach works. We're making this public so that we can develop it in the open with input from the community.
9+
🚧 This is in active development and is only ready for collaborators. You can find the current roadmap and opportunities to contribute in https://github.com/supabase-community/postgres_lsp/issues/136.
1010

1111
## Features
1212

1313
The [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) is an open protocol between code editors and servers to provide code intelligence tools such as code completion and syntax highlighting. This project implements such a language server for Postgres, significantly enhancing the developer experience within your favorite editor by adding:
1414

15-
- Semantic Highlighting
15+
- Lint
16+
- Hover
17+
- Typechecking
1618
- Syntax Error Diagnostics
17-
- Show SQL comments on hover
19+
- Inlay Hints
1820
- Auto-Completion
1921
- Code actions such as `Execute the statement under the cursor`, or `Execute the current file`
20-
- Configurable Code Formatting
22+
- Formatter
2123
- ... and many more
2224

25+
We plan to support all of the above for SQL and PL/pgSQL function bodies too!
26+
2327
## Motivation
2428

2529
Despite the rising popularity of Postgres, support for the PL/pgSQL in IDEs and editors is limited. While there are some _generic_ SQL Language Servers[^1] offering the Postgres syntax as a "flavor" within the parser, they usually fall short due to the ever-evolving and complex syntax of PostgreSQL. There are a few proprietary IDEs[^2] that work well, but the features are only available within the respective IDE.
@@ -28,39 +32,14 @@ This Language Server is designed to support Postgres, and only Postgres. The ser
2832

2933
Once the parser is stable, and a robust and scalable data model is implemented, the language server will not only provide basic features such as semantic highlighting, code completion and syntax error diagnostics, but also serve as the user interface for all the great tooling of the Postgres ecosystem.
3034

31-
## Roadmap
32-
33-
This is a proof of concept for building both a concrete syntax tree and an abstract syntax tree from a potentially malformed PostgreSQL source code. The `postgres_lsp` crate was created to prove that it works end-to-end, and is just a very basic language server with semantic highlighting and error diagnostics. Before further feature development, we have to complete a bit of groundwork:
34-
35-
1. _Finish the parser_
36-
- ✅ The core parser algorithm is implemented. Check out [this blog post](https://supabase.com/blog/postgres-language-server-implementing-parser) for details.
37-
- 🚧 But we need help from the community to finalize it: https://github.com/supabase/postgres_lsp/issues/51.
38-
2. _Implement a robust and scalable data model_
39-
- RFC posted here https://github.com/supabase/postgres_lsp/discussions/107
40-
3. _Setup the language server properly_
41-
- This is still in a research phase
42-
- Once again `rust-analyzer` will serve as a role model, and we will most likely implement the same queueing and cancellation approach
43-
4. _Implement basic language server features_
44-
- Semantic Highlighting
45-
- Syntax Error Diagnostics
46-
- Show SQL comments on hover
47-
- Auto-Completion
48-
- Code Actions, such as `Execute the statement under the cursor`, or `Execute the current file`
49-
- ... anything you can think of really
50-
5. _Integrate all the existing open source tooling_
51-
- Show migration file lint errors from [squawk](https://github.com/sbdchd/squawk)
52-
- Show plpsql lint errors from [plpgsql_check](https://github.com/okbob/plpgsql_check)
53-
6. _Build missing pieces_
54-
- An optionated code formatter (think prettier for PostgreSQL)
55-
7. _(Maybe) Support advanced features with declarative schema management_
56-
- Jump to definition
57-
- ... anything you can think of really
58-
5935
## Installation
6036

6137
> [!WARNING]
6238
> This is not ready for production use. Only install this if you want to help with development.
6339
40+
> [!NOTE]
41+
> Interested in setting up a release process and client extensions for Neovim and VS Code? Please check out https://github.com/supabase-community/postgres_lsp/issues/136!
42+
6443
### Neovim
6544

6645
Add the postgres_lsp executable to your path, and add the following to your config to use it.
@@ -81,7 +60,7 @@ lsp.configure("postgres_lsp", {force_setup = true})
8160

8261
### Building from source
8362

84-
You'll need *nightly* Cargo, Node, and npm installed.
63+
You'll need _nightly_ Cargo, Node, and npm installed.
8564

8665
Install the `libpg_query` submodule by running:
8766

@@ -101,28 +80,25 @@ If you're not using VS Code, you can install the server by running:
10180
cargo xtask install --server
10281
```
10382

104-
10583
The server binary will be installed in `.cargo/bin`. Make sure that `.cargo/bin` is in `$PATH`.
10684

10785
### Github CodeSpaces
86+
10887
Currently, Windows does not support `libpg_query`. You can setup your development environment
10988
on [CodeSpaces](https://github.com/features/codespaces).
11089

11190
After your codespace boots up, run the following command in the shell to install Rust:
91+
11292
```shell
11393
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
11494
```
95+
11596
Proceed with the rest of the installation as usual.
11697

11798
## Contributors
11899

119100
- [psteinroe](https://github.com/psteinroe) (Maintainer)
120101

121-
## Acknowledgments
122-
123-
- [rust-analyzer](https://github.com/rust-lang/rust-analyzer) for implementing such a robust, well documented, and feature-rich language server. Great place to learn from.
124-
- [squawk](https://github.com/sbdchd/squawk) and [pganalyze](https://pganalyze.com) for inspiring the use of libpg_query.
125-
126102
## Footnotes
127103

128104
[^1]: Generic SQL Solutions: [sql-language-server](https://github.com/joe-re/sql-language-server), [pgFormatter](https://github.com/darold/pgFormatter/tree/master), [sql-parser-cst](https://github.com/nene/sql-parser-cst)

0 commit comments

Comments
 (0)