Skip to content

Install

Neovim 0.12+ is required. You can install vim-teradata using Neovim's built-in package manager or your favorite plugin manager.

1) Add plugin

=== "Built-in package manager (Neovim 0.12+)"

```lua
-- In your init.lua
vim.pack.add('ErwonB/vim-teradata')

require('vim-teradata').setup({
  users = {
    {
      log_mech = 'TD2',   -- e.g. TD2, LDAP, KRB5, ...
      user     = 'USER',  -- username (password stored in tdwallet)
      tdpid    = 'HOST',  -- Teradata host or IP
    },
  },
  replacements = {
    ['${DB_NAME}'] = 'MY_DB',
  },
})
```

=== "lazy.nvim"

```lua
{
  'ErwonB/vim-teradata',
  ft = { 'sql', 'teradata' },
  opts = {
    users = {
      {
        log_mech = 'TD2',
        user     = 'USER',
        tdpid    = 'HOST',
      },
    },
    replacements = {
      ['${DB_NAME}'] = 'MY_DB',
    },
  },
}
```

=== "packer.nvim"

```lua
use({
  'ErwonB/vim-teradata',
  config = function()
    require('vim-teradata').setup({
      users = {
        {
          log_mech = 'TD2',
          user     = 'USER',
          tdpid    = 'HOST',
        },
      },
      replacements = {
        ['${DB_NAME}'] = 'MY_DB',
      },
    })
  end,
})
```

2) Install the Teradata Tree-sitter parser

Install the dedicated teradata Tree-sitter parser (it provides its own parser without replacing your default sql parser). Follow Tree-sitter (Teradata SQL) to copy the parser library and queries.

3) First-time metadata sync

Open Neovim and run:

:TDSync

This builds a local metadata index (databases, tables, columns) used by sql-autocomplete.

4) Health check & verification

  • Run :checkhealth vim-teradata to inspect your configuration, TTU binaries (bteq, tdwallet), and connection profiles.
  • Run :checkhealth treesitter to ensure the teradata parser is detected.
  • Open a .sql file and start typing — you should see blink.cmp or nvim-cmp completion after FROM and JOIN (or press <C-X><C-O> for native omnifunc).
  • Execute a query with :TDO, re-run with :TDRerun (or g.), and view async jobs in :TDJ.