Tsuchinoko VS Code 拡張 導入マニュアル
🇯🇵 日本語版
Prerequisites
- VS Code 1.70 or later
- Tsuchinoko (
tnk command) installed and accessible in PATH
Installation
Option 1: Install from .vsix file
code --install-extension tsuchinoko-0.1.0.vsix
Option 2: Build from Source
cd vscode-extension
npm install
npm run compile
npx vsce package
code --install-extension tsuchinoko-0.1.0.vsix
Usage
Show Rust Preview
- Open a Python file (
.py)
- Press
Ctrl+Alt+P (or Cmd+Alt+P on Mac)
- A side panel will show the transpiled Rust code
Real-time Diagnostics
- Unsupported syntax will be highlighted with red squiggly lines
- Hover over the highlighted code to see error details
- Diagnostics update automatically when you save the file
Commands
| Command |
Keybinding |
Description |
Tsuchinoko: Show Rust Preview |
Ctrl+Alt+P |
Open Rust preview panel |
Tsuchinoko: Transpile to Rust |
- |
Transpile current file |
Configuration
Open VS Code Settings (Cmd+,) and search for “Tsuchinoko”:
| Setting |
Default |
Description |
tsuchinoko.tnkPath |
tnk |
Path to the tnk command |
tsuchinoko.autoCheck |
true |
Automatically check on save |
tsuchinoko.checkDelay |
500 |
Delay before checking (ms) |
Troubleshooting
“tnk command not found”
- Ensure
tnk is installed: tnk --version
- If installed but not in PATH, set the full path in settings:
"tsuchinoko.tnkPath": "/path/to/tnk"
Preview not updating
- Save the file (
Cmd+S) to trigger refresh
- Check the Output panel (
View > Output > Tsuchinoko) for errors
Diagnostics not showing
- Ensure
tsuchinoko.autoCheck is enabled
- Check if the file has
.py extension
Uninstall
code --uninstall-extension tsuchinoko