Skip to content

Tree-sitter (Teradata SQL)

The tree-sitter-teradata parser is a dedicated Tree-sitter parser tailored to Teradata SQL. It registers its own teradata parser and does not replace the default sql parser.

Download

Install locations

Neovim loads parsers from any directory on runtimepath under parser/ and queries under queries/teradata/. Use these typical paths (create folders if they don't exist):

Linux

  • Parser: ~/.local/share/nvim/site/parser/teradata.so
  • Queries: ~/.local/share/nvim/site/queries/teradata/

macOS

  • Parser: ~/.local/share/nvim/site/parser/teradata.dylib
  • Queries: ~/.local/share/nvim/site/queries/teradata/

Windows

  • Parser: %LOCALAPPDATA%\nvim-data\site\parser\teradata.dll
  • Queries: %LOCALAPPDATA%\nvim-data\site\queries\teradata\

Tip: In Neovim, you can inspect standard paths with:

:lua print(vim.fn.stdpath('data'))
:lua print(vim.o.runtimepath)

Copy the released parser library file to the parser/ path and copy the entire contents of the queries folder into queries/teradata/.

Enable per filetype (optional)

vim-teradata exposes an ft option to explicitly enable diagnostics for certain filetypes:

require('vim-teradata').setup({
  ft = { 'sql', 'teradata' }, -- enable Teradata diagnostics in these filetypes
  -- ...your other settings
})

Verify

Run:

:checkhealth treesitter
:checkhealth vim-teradata

You should see teradata with the Teradata parser loaded. Open a .sql file and introduce an obvious syntax error to see a diagnostic ERROR.