Taqra for VS Code
Language support for Taqra (.tqr): syntax highlighting, brackets and comments, snippets, compiler diagnostics, and commands to run or build the current file.
Install
In VS Code, open Extensions, search for @id:ei2537.taqra-language, and install Taqra by ei2537. You can also install it from a terminal:
code --install-extension ei2537.taqra-language
To install a downloaded VSIX, open Extensions → … → Install from VSIX… and select the .vsix file.
Set up the compiler
Syntax highlighting, file icons and snippets work without the Taqra compiler. Diagnostics, run and build commands use the native Taqra CLI, which is installed separately. Follow the Taqra installation instructions to build and install the CLI from source with Rust and Cargo.
Keep taqra on the extension host's PATH, or configure its absolute path in VS Code settings:
{
"taqra.compilerPath": "C:\\path\\to\\taqra.exe"
}
On Linux, use a path such as /path/to/taqra. Keep the Rust toolchain used to install the CLI available: Taqra uses it when compiling programs. On remote workspaces, install the CLI and toolchain on the extension host.
Editing
- Open a
.tqr file to activate the extension.
- Use
main, fn, if, while, for, rep, rrep, or input snippets; accept the proposed snippet in VS Code.
- The editor recognizes line comments
//, nested block comments /* ... */, strings, raw/triple/byte literals, and interpolation.
- Saved files are checked when opened and saved. Errors appear in Problems and in the editor. Editing a checked file immediately clears old markers; save again to refresh them.
- The current compiler reports one error at a time.
- Highlighting describes tokens. It does not replace the compiler's syntax and type checks.
The snippets use compact commas in arguments, matching the project's preferred style. Spaces after commas remain valid language syntax. The extension does not format files or insert required semicolons automatically.
Commands
Open the Command Palette and choose:
| Command |
Behavior |
| Taqra: Check Current File |
Check the current saved file without executing it. Save dirty or untitled files first. |
| Taqra: Run Current File |
Save edits, then launch taqra run as a process task in the terminal. The play button also runs this command. |
| Taqra: Build Current File |
Save edits, then launch taqra build as a process task. |
| Taqra: Show Compiler Output |
Show checker and tool-startup messages. |
Run and build require the file to belong to an open workspace folder. Run uses the terminal for standard input, so programs using input() can be used interactively. Task execution uses separate process arguments, including for paths containing spaces.
Compiler commands require a trusted workspace and files on the extension host filesystem. Highlighting and snippets remain available in Restricted Mode. Virtual and unsaved documents are not passed to the compiler. On remote workspaces, configure/install the compiler on the extension host.
Settings
| Setting |
Default |
Description |
taqra.compilerPath |
taqra |
Native executable name or absolute path; no shell expansion. |
taqra.checkOnOpen |
true |
Check saved Taqra files on opening. |
taqra.checkOnSave |
true |
Check saved Taqra files after saving. |
taqra.checkTimeout |
10000 |
Check timeout in milliseconds, from 1000 to 120000. |
If checks cannot start, open the Taqra output channel and check the compiler path. Missing or timed-out tools are reported as tool errors rather than as source diagnostics.
Build from this repository
From editors/vscode, with Node.js 22 or newer:
npm ci
npm test
npm run package
The package is written to the repository's target/vscode-taqra/ directory. To try a development build, open this directory in VS Code and launch Taqra Extension with F5.
The automated unit suite checks diagnostics and the real TextMate tokenizer. An additional real Extension Host smoke test is available:
npm run test:host -- --allow-window
This opens a separate temporary VS Code instance using isolated profile, workspace and extension directories. It requires an installed VS Code and built Taqra CLI. See the launcher output for saved test logs. It is not run as part of npm test.
This initial version does not provide a language server, semantic completion, rename, debugger or formatter. Framework support is separate from editor support.
License
This extension's source code and packaged files are released under the MIT License. Licensing for the Taqra compiler and runtime is managed separately.