as of Sep 26, 2025 , this is not working. Any help is well appreciated
For docs visit - docs.harneetlang.com
This folder contains Helix configuration, a Tree-sitter grammar scaffold, and a theme for the Harneet programming language (.ha).
languages.toml— Helix language configuration and grammar source mappingthemes/harneet.toml— A dark theme tailored for Harneet syntax groupstree-sitter-harneet/— Tree-sitter grammar scaffoldgrammar.js— Grammar rules (WIP but covers most core language features)queries/highlights.scm— Highlight queries mapping grammar nodes to scopespackage.json— Build/test scripts for Tree-sitter
install.sh— Helper script to build the grammar and install config/theme into your Helix runtime or user config
- Node.js / npm (for
tree-sitter-cli) - Helix editor installed locally
- Optional: write access to Helix runtime overlay for easy installation
Install Tree-sitter CLI globally:
npm i -g tree-sitter-clicd /Users/gjanjua/sandbox/personal/harneet_org/helix/tree-sitter-harneet
# Generate parser sources
tree-sitter generate
# (Optional) run tests later when corpus is added
# tree-sitter testYou can use the helper script, which installs to your Helix runtime if present,
falling back to your user config at ~/.config/helix.
cd /Users/gjanjua/sandbox/personal/harneet_org/helix
chmod +x install.sh
./install.sh # optional arg: path to helix runtime, defaults to /Users/gjanjua/sandbox/personal/helix/runtimeWhat the script does:
- Copies
languages.tomlto either the Helix runtime or~/.config/helix/languages.toml - Copies
themes/harneet.tomlinto the appropriate themes directory - Runs
tree-sitter generateintree-sitter-harneet/iftree-sitteris available
If you prefer to set things up manually:
- Language config
- Copy
languages.tomlto one of:~/.config/helix/languages.toml- Project-local:
.helix/languages.tomlin your Harneet project - Helix runtime:
/Users/gjanjua/sandbox/personal/helix/runtime/languages.toml
- Copy
- Theme
- Copy
themes/harneet.tomlinto:~/.config/helix/themes/harneet.toml- or your Helix runtime themes directory
- Copy
- Grammar
- Leave
[[grammar]]path inlanguages.tomlas./tree-sitter-harneetif rel-path works from wherelanguages.tomlis installed - Otherwise, change the grammar
source.pathto an absolute path to thetree-sitter-harneetdirectory
- Leave
In your Helix config file ~/.config/helix/config.toml, set:
theme = "harneet"- Open any
.hafile in Helix - You should see:
- Keywords, strings, numbers, booleans, None/null
- Functions and parameters (including anonymous and arrow functions)
- Struct type declarations
- Arrays, maps, typed arrays
- Calls, member/index access, assignments, operators
- Current grammar is functional and covers most language constructs. We can extend it further to cover:
- Method declarations, tuple returns, multiple assignment
- More operator precedence rules and pattern matching edge cases
- A test corpus (Tree-sitter) to prevent regressions (
corpus/)
- If you run into any parsing or highlighting issues, please share the
.hasnippet and we’ll augment the grammar/queries.
When making grammar changes:
cd /Users/gjanjua/sandbox/personal/harneet_org/helix/tree-sitter-harneet
# Edit grammar.js or queries/highlights.scm
tree-sitter generate
# Re-run install if languages.toml or theme changed
cd ..
./install.shHappy coding in Harneet with Helix!