Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

tree-sitter-toolang

tree-sitter-toolang is the Tree-sitter grammar package for Toolang .too files. This page shows what the package is for, where it lives, and how to use it from common Tree-sitter tools.

GitHub: openhat-ai/tree-sitter-toolang

Use cases

Use this package when a Tree-sitter-based tool needs to parse Toolang source.

  • syntax highlighting
  • structural search
  • outline and tag generation
  • editor integrations
  • scripts that inspect .too files

If you only want Toolang support in Zed, use zed-toolang.

Package names

  • npm: tree-sitter-toolang
  • PyPI: tree-sitter-toolang
  • Cargo: tree-sitter-toolang

Tree-sitter identifiers:

  • language name: toolang
  • scope: source.toolang
  • file extension: .too

Tree-sitter CLI

Clone the grammar:

git clone https://github.com/openhat-ai/tree-sitter-toolang.git

Add the parent directory containing tree-sitter-toolang to the parser-directories list in your Tree-sitter config. Then verify discovery:

tree-sitter dump-languages

Use it with .too files:

tree-sitter parse path/to/file.too
tree-sitter highlight path/to/file.too
tree-sitter tags path/to/file.too

Python

python -m pip install tree-sitter-toolang tree-sitter
import tree_sitter_toolang
from tree_sitter import Language, Parser
 
language = Language(tree_sitter_toolang.language())
parser = Parser(language)
tree = parser.parse(b"use skill openhat/workspace-search\n")

The Python package also exports HIGHLIGHTS_QUERY, INJECTIONS_QUERY, INDENTS_QUERY, OUTLINE_QUERY, and TAGS_QUERY.

Rust

[dependencies]
tree-sitter = "0.25"
tree-sitter-toolang = "0.0.16"
let language = tree_sitter::Language::new(tree_sitter_toolang::LANGUAGE);
© 2026 Toolang