Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>ecsql-lspNew to Visual Studio Code? Get it now.
ecsql-lsp

ecsql-lsp

mikemikeb

|
120 installs
| (0) | Free
a language server for the ECSQL language used by iTwin.js
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ecsql-ls

A language server and vscode extension for ECSQL.

Currently as a minimum viable implementation it uses a configured regex to search for calls on objects to query or withPreparedStatement and then tries to the parse the following string literal as a SQL query. It will then provide some auto-completion depending on where your cursor is in the query. You can customize the regex used to find queries.

demo gif

USAGE REQUIREMENT

At the moment, you can only get auto complete in your ECSQL in vscode by setting the following vscode setting.

{
  "editor.quickSuggestions": {
    "strings": true
  }
}

In the future this should not be necessary to set yourself.

Features

  • auto-complete new columns in SELECT statements based on which tables you are querying
  • auto-complete new tables in FROM clauses based on which columns you are selecting
  • auto-complete columns in ON and WHERE conditions, including aliases, SELECTed and non-SELECT-ed columns

TODO

  • on-hover determine from which table a column must be from and provide the documentation of the most-derived class, currently just finds the first matching property
  • don't limit FROM auto-complete to tables that contain the SELECTed attributes, instead prioritize those and the list the rest.
  • process more than just the BisCore schema
  • add implicit ECSourceId/ECTargetId properties to relationship table properties

Building the extension

pnpm run build
pnpm run package
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft