Open
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
I'm using the Zed.dev editor and the https://github.com/LoamStudios/zed-postgres-language-server extension with the following configuration in my postgrestools.jsonc
file:
{
"$schema": "https://pgtools.dev/0.8.1/schema.json",
"extends": [],
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignore": ["**/mysql*/*.sql"],
"include": ["**/postgres*/*.sql"]
},
"linter": {
"enabled": false,
"rules": {
"recommended": true
}
},
"db": {
"host": "127.0.0.1",
"port": 5432,
"username": "postgres",
"password": "",
"database": "mydb",
"connTimeoutSecs": 10
}
}
I'm getting the lint hints successfully, however it seems like the files.ignore
directive is not being respected - I receive numerous syntax errors for any files which match the glob pattern in that setting.
Here's a sampled response for one such file:
{
"jsonrpc": "2.0",
"method": "textDocument/publishDiagnostics",
"params": {
"uri": "file:///Users/seanstewart/project/myproject/.docker-init/mysql/init.sql",
"diagnostics": [
{
"range": {
"start": { "line": 0, "character": 0 },
"end": { "line": 0, "character": 39 }
},
"severity": 1,
"code": "syntax",
"source": "pg",
"message": "Invalid statement: syntax error at or near \"NOT\""
},
{
"range": {
"start": { "line": 2, "character": 0 },
"end": { "line": 8, "character": 2 }
},
"severity": 1,
"code": "syntax",
"source": "pg",
"message": "Invalid statement: syntax error at or near \"AUTO_INCREMENT\""
},
{
"range": {
"start": { "line": 10, "character": 0 },
"end": { "line": 19, "character": 2 }
},
"severity": 1,
"code": "syntax",
"source": "pg",
"message": "Invalid statement: syntax error at or near \"AUTO_INCREMENT\""
}
],
"version": 0
}
}
Expected behavior
I would expect to see this file ignored by the LSP.