Skip to content

Autocomplete

sql-autocomplete provides schema‑aware suggestions once you run :TDSync.

Metadata sync (:TDSync)

  • Builds a local index of databases → tables → columns from your default connection.
  • Typical duration: ~2 minutes for a few million columns.
  • Full refresh only (no incremental mode yet).
  • Cannot be cancelled.
  • Requires read access to dbc.columnsv.
  • When you connect to a different system, re‑run :TDSync manually.

Storage location (Neovim):

  • vim.fn.stdpath('data') .. '/sql-autocomplete'

Completion behavior

  • Scope‑aware suggestions (e.g., after FROM show tables; after alias a. show columns).
  • Case‑insensitive matching.
  • Ranking/fuzzy logic delegated to blink.cmp or nvim-cmp.

Blink.cmp integration (supported)

sql-autocomplete is automatically added as a provider if blink.cmp is detected.

Nvim-cmp integration (supported)

sql-autocomplete is automatically added as a provider if nvim-cmp is detected, but you need to add td_sql_completion as a source in your nvim-cmp setup.

Demo

Terminal