Skip to content

chore: update docs url #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions crates/pgt_configuration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ impl PartialConfiguration {
/// Returns the initial configuration.
pub fn init() -> Self {
Self {
// TODO: Update this once we have a static url
schema: Some(format!(
"https://supabase-community.github.io/postgres_lsp/schemas/{VERSION}/schema.json"
)),
schema: Some(format!("https://pgtools.dev/schemas/{VERSION}/schema.json")),
files: Some(PartialFilesConfiguration {
ignore: Some(Default::default()),
..Default::default()
Expand Down
6 changes: 2 additions & 4 deletions crates/pgt_workspace/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,13 @@ pub fn create_config(

// we now check if pglt is installed inside `node_modules` and if so, we use the schema from there
if VERSION == "0.0.0" {
let schema_path = Path::new("./node_modules/@pglt/pglt/schema.json");
let schema_path = Path::new("./node_modules/@postgrestools/postgrestools/schema.json");
let options = OpenOptions::default().read(true);
if fs.open_with_options(schema_path, options).is_ok() {
configuration.schema = schema_path.to_str().map(String::from);
}
} else {
configuration.schema = Some(format!(
"https://supabase-community.github.io/postgres_lsp/schemas/{VERSION}/schema.json"
));
configuration.schema = Some(format!("https://pgtools.dev/schemas/{VERSION}/schema.json"));
}

let contents = serde_json::to_string_pretty(&configuration)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ After running the `init` command, you’ll have a `postgrestools.jsonc` file in

```json
{
"$schema": "https://supabase-community.github.io/postgres_lsp/schemas/0.0.0/schema.json",
"$schema": "https://pgtools.dev/schemas/0.0.0/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
Expand Down