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-teradatato inspect your configuration, TTU binaries (bteq,tdwallet), and connection profiles. - Run
:checkhealth treesitterto ensure theteradataparser is detected. - Open a
.sqlfile and start typing — you should seeblink.cmpornvim-cmpcompletion afterFROMandJOIN(or press<C-X><C-O>for native omnifunc). - Execute a query with
:TDO, re-run with:TDRerun(org.), and view async jobs in:TDJ.