Tolk Language Support for VS CodeTolk is a new language for writing smart contracts in TON. Think of Tolk as the "next‑generation FunC". Tolk compiler is literally a fork of FunC compiler, introducing familiar syntax similar to TypeScript, but leaving all low-level optimizations untouched. This extension fully covers Tolk grammar and will be kept up to date with Tolk evolution. How to installJust search for "Tolk" in VS Code Marketplace. Here is a direct link. Features
Most missing features are "find usages" and auto-inserting imports. I hope to have enough time for implementation soon. Watch a short video of how it looks like: https://github.com/user-attachments/assets/aa7c6fef-6139-4b96-ac2f-75fc9d60c5cc About Tolk SDK auto-detectionTolk offers many standard functions, like This extension automatically also discovers them automatically (to provide auto-completion and so on).
Most likely, you don't have to do anything — it just works. Below is an explanation.
For example, if you use blueprint,
it automatically installs tolk-js,
and therefore, folder If you don't use blueprint, this extension searches for default system paths.
For example, on Linux, having installed a fresh TON package via Anyway, you can open disable auto-detection in extension settings for a current workspace
and manually specify So, the algorithm is as follows:
Invoke "Show detected Tolk SDK" from the command palette to view current values.
This command also clears cache (helpful in corner cases, e.g. you opened an empty project, detection failed,
then you did Brief info about implementationHistorically, this extension has been cloned from vscode-func and completely refactored. It's implemented via LSP (Language Server Protocol). Parsing is implemented via tree-sitter-tolk. Unparsed nodes are treated as syntax errors. All symbols are kept in memory, assuming that Tolk projects are small enough. There is a lot to improve both in functionality and implementation, but anyway, basic everyday needs are definitely satisfied. Building & running locally
Developing and updating grammar |