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 active connection.
  • Typical duration: ~2 minutes for a few million columns.
  • Requires read access to dbc.columnsv.
  • Filter database scope using the filter_db option.
  • When catalog definitions or DDL changes on the system, re-run :TDSync manually to update the index.

Storage location:

  • vim.fn.stdpath('data') .. '/teradata' (configurable via data_dir)

Completion behavior

  • Scope-aware suggestions:
    • After FROM or JOIN: completes databases, then tables.
    • After <table>.: completes columns belonging to that table.
    • Teradata built-in SQL functions are always suggested.
  • Case-insensitive matching.
  • Candidate ranking and fuzzy matching are handled by your completion plugin.

Supported engines

blink.cmp

Automatically registered as a completion provider if blink.cmp is detected.

nvim-cmp

Automatically registered if nvim-cmp is detected. Simply add td_sql_completion to your sources list:

cmp.setup({
  sources = {
    { name = 'td_sql_completion' },
    -- your other sources...
  },
})

Built-in omnifunc (<C-X><C-U>)

If you do not use blink.cmp or nvim-cmp, you can invoke native Neovim completion anywhere in a Teradata buffer using insert-mode <C-X><C-U>.

Demo

Terminal