Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 24aa163

Browse files
committedMar 27, 2025·
merge, format
2 parents 575381d + 01ab9f6 commit 24aa163

File tree

3 files changed

+64
-6
lines changed

3 files changed

+64
-6
lines changed
 

‎biome.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"vcs": {
44
"enabled": false,
55
"clientKind": "git",
6-
"useIgnoreFile": false
6+
"useIgnoreFile": true
77
},
88
"files": {
99
"ignoreUnknown": false,

‎docs/index.md

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,22 @@ Our current focus is on refining and enhancing these core features while buildin
2525

2626
## Installation
2727

28-
> [!NOTE]
29-
> We will update this section once we have published the binaries.
28+
To install Postgres Tools, grab the executable for your platform from the [latest CLI release](https://github.com/supabase-community/postgres_lsp/releases/latest) on GitHub and give it execution permission.
29+
30+
```sh
31+
curl -L https://github.com/supabase-community/postgres_lsp/releases/download/<version>/postgrestools_aarch64-apple-darwin -o postgrestools
32+
chmod +x postgrestools
33+
```
34+
35+
Now you can use Postgres Tools by simply running `./postgrestools`.
36+
37+
If you are using Node, you can also install the CLI via NPM. Run the following commands in a directory containing a `package.json` file.
38+
39+
```sh
40+
pnpm add --save-dev --save-exact @postgrestools/postgrestools
41+
```
42+
43+
To use Postgres Tools in your favorite IDE, we recommend [installing an editor plugin](#install-an-editor-plugin).
3044

3145
## Configuration
3246

@@ -89,8 +103,52 @@ Make sure to check out the other options. We will provide guides for specific us
89103

90104
We recommend installing an editor plugin to get the most out of Postgres Language Tools.
91105

92-
> [!NOTE]
93-
> We will update this section once we have published the binaries.
106+
### VSCode
107+
108+
TODO
109+
110+
### Neovim
111+
112+
You will have to install `nvim-lspconfig`, and follow the [instructions](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#postgres_lsp).
113+
114+
### Other
115+
116+
Postgres Tools has first-class LSP support. If your editor does implement LSP, then the integration of Postgres Tools should be seamless.
117+
118+
#### Use the LSP Proxy
119+
120+
Postgres Tools has a command called `lsp-proxy`. When executed, two processes will spawn:
121+
122+
- a daemon that does execute the requested operations;
123+
- a server that functions as a proxy between the requests of the client - the editor - and the server - the daemon;
124+
If your editor is able to interact with a server and send [JSON-RPC](https://www.jsonrpc.org) requests, you only need to configure the editor to run that command.
125+
126+
#### Use the daemon with the binary
127+
128+
Using the binary via CLI is very efficient, although you won’t be able to provide logs to your users. The CLI allows you to bootstrap a daemon and then use the CLI commands through the daemon itself.
129+
In order to do so, you first need to start a daemon process with the start command:
130+
131+
```sh
132+
postgrestools start
133+
```
134+
135+
Then, every command needs to add the `--use-server` options, e.g.:
136+
137+
```sh
138+
echo "select 1" | biome check --use-server --stdin-file-path=dummy.sql
139+
```
140+
141+
#### Daemon logs
142+
143+
The daemon saves logs in your file system. Logs are stored in a folder called `pgt-logs`. The path of this folder changes based on your operative system:
144+
145+
- Linux: `~/.cache/pgt;`
146+
- Windows: `C:\Users\<UserName>\AppData\Local\supabase-community\pgt\cache`
147+
- macOS: `/Users/<UserName>/Library/Caches/dev.supabase-community.pgt`
148+
149+
For other operative systems, you can find the folder in the system’s temporary directory.
150+
151+
You can change the location of the `pgt-logs` folder via the `PGT_LOG_PATH` variable.
94152

95153
## CI Setup
96154

‎mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ theme:
1515
nav:
1616
- Introduction: index.md
1717
- Guides:
18-
- Linting Migrations: linting_migrations.md
18+
- Linting Migrations: checking_migrations.md
1919
- Troubleshooting: troubleshooting.md
2020
- Reference:
2121
- Rules: rules.md

0 commit comments

Comments
 (0)
Please sign in to comment.