Skip to content

This guide shows you how to set up TQL syntax highlighting and language detection in your editor. You’ll get colorization and basic language support for .tql files.

TQL editor integrations use the Tree-sitter TQL grammar for incremental parsing. The grammar repository also ships Tree-sitter queries for highlights, indentation, folds, injections, and local variables.

Install the TQL extension for VS Code for syntax highlighting and language support.

VS Code-compatible editors such as Cursor and Windsurf can use the same extension when it is available in their extension marketplace. If the extension doesn’t appear there, install a packaged .vsix file manually.

Zed is a high-performance editor with AI integration. Install the TQL extension for Zed from the Zed extensions view or from the extension repository. The extension bundles the latest TQL parser and highlight queries.

Helix includes TQL syntax highlighting and indentation support. Use a Helix version that ships the TQL grammar, then fetch and build the bundled parser:

Terminal window
hx --grammar fetch
hx --grammar build

Open a .tql file and run hx --health tql to confirm that Helix detects the language and parser.

Use nvim-treesitter to install the Tree-sitter TQL parser and register the tql filetype.

With lazy.nvim, add this plugin configuration:

return {
'neovim-treesitter/nvim-treesitter',
dependencies = {
'neovim-treesitter/treesitter-parser-registry',
},
lazy = false,
build = ':TSUpdate',
config = function()
local treesitter = require('nvim-treesitter')
treesitter.setup {
local_parsers = {
tql = {
source = {
type = 'self_contained',
url = 'https://github.com/tenzir/tree-sitter-tql',
semver = false,
queries_path = 'queries/tql',
},
filetypes = { 'tql' },
},
},
}
treesitter.install({ 'tql' })
vim.api.nvim_create_autocmd('FileType', {
pattern = 'tql',
callback = function()
vim.treesitter.start()
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end,
})
vim.filetype.add({ extension = { tql = 'tql' } })
end,
}

After you update your Neovim plugins, open a .tql file and run :InspectTree to confirm that Neovim uses the TQL parser.

Last updated: