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).
  • No progress UI; 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.

Blink.cmp integration (supported)

Add the provider to Blink.cmp and include it in your default sources:

-- blink.cmp config excerpt
sources = {
  default = { 'sql_completion', --[[ other providers... ]] },
  providers = {
    sql_completion = {
      name = 'SqlCompletion',
      module = 'sql_completion',
    },
  },
}

nvim-cmp is not supported.

Demo

Terminal