sql-language-server is an implementation of the Language Server Protocol (LSP) providing intelligent features for various SQL dialects, including linting, autocompletion, and schema introspection. It is designed to be run as a standalone server process, enabling integration with code editors and IDEs (like VS Code) that support LSP. The current stable version is 1.7.1, with minor releases appearing to follow a monthly or bi-monthly cadence, indicating active development. Key differentiators include its pluggable architecture for different SQL database clients (e.g., PostgreSQL, SQLite, BigQuery) and its focus on robust parsing and error handling, making it a valuable tool for SQL development workflows. It ships with TypeScript types, facilitating its use in TypeScript-based environments.
npm install sql-language-serverVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install the SQL Language Server globally and run it via standard I/O. Includes a commented example of how an LSP client in a VS Code extension might programmatically start and connect to the server process.
Review the `vscode-languageserver` changelog for `8.0.0-next.8` and update any custom client or host code that directly interacts with the LSP client/server libraries to ensure compatibility with the new API.
Upgrade to v1.3.0 or newer to benefit from the fix addressing the double-boot issue. Ensure proper lifecycle management of the server process within your LSP host environment.
Upgrade to v1.2.1 or newer to resolve issues with double-quoted identifiers. Ensure your SQL parser configuration is up-to-date with the latest version's parsing capabilities.
Implement robust client-side validation or interpret diagnostics provided by the language server. Do not assume the absence of an error throw implies completely successful parsing in all contexts; instead, rely on the diagnostic messages provided by the LSP.
Ensure the `sql-language-server` is correctly configured with the database connection details (e.g., PostgreSQL, SQLite). Manually trigger a schema refresh or restart the language server if the database schema has recently changed.
Ensure the language server is launched from the correct working directory that contains your SQL project. Verify client-side LSP configurations that specify the `rootPath` or `workspaceFolders` are pointing to valid directories.
Upgrade to `sql-language-server` version 1.6.0 or newer, which contains a fix for this specific parsing error. If upgrading isn't an option, rephrase the SQL query to avoid the problematic `IS NOT NULL` pattern if possible.