GoSQLX – JetBrains IDE LSP Setup
Supported IDEs: IntelliJ IDEA, GoLand, DataGrip, WebStorm, PyCharm, and others (2023.2+).
Prerequisites
- GoSQLX installed and available on your
$PATH - JetBrains IDE version 2023.2 or later (built-in LSP support)
Configuration
- Open Settings → Languages & Frameworks → Language Servers (or search for “LSP” in Settings).
- Click + to add a new server.
- Configure:
- Name:
GoSQLX - Command:
gosqlx lsp - File patterns:
*.sql,*.pgsql,*.mysql
- Name:
- Click OK / Apply.
Manual Configuration (settings.json)
If your IDE supports custom LSP definitions via JSON, add:
{
"lsp": {
"gosqlx": {
"command": ["gosqlx", "lsp"],
"fileTypes": ["sql"],
"initializationOptions": {
"dialect": "postgresql"
}
}
}
}
Verify
Open any .sql file. You should see GoSQLX diagnostics and formatting available via the editor’s code actions.
Troubleshooting
- Ensure
gosqlxis on your$PATHby runninggosqlx --versionin the terminal. - Check Help → Diagnostic Tools → Debug Log Settings and add
#lspfor LSP debug logging.