Thagore Developer Support (VS Code)
Extension giúp bạn viết và chạy mã Thagore trong VS Code với highlight đầy đủ, icon file, gợi ý, và nút chạy nhanh.
Tính năng chính
- Syntax highlighting hoàn chỉnh cho
.tg và .tgc (keywords, chuỗi có nội suy, số, toán tử, comment).
- Gợi ý/Completion cho keyword, built-in (
out, in), hàm/biến trong file, và module import.
- Snippets sẵn:
func, if, for, try, match, use, out, v.v.
- Nút Run/Check ngay trong CodeLens đầu file và trên status bar; lệnh chạy đoạn chọn.
- Kênh Output “Thagore” hiển thị stdout/stderr từ CLI
thagore.
Cách dùng nhanh
- Mở file
.tg hoặc .tgc. Bạn sẽ thấy CodeLens “Run Thagore / Check Thagore” ở dòng đầu và nút play/check trên status bar.
- Command Palette:
Thagore: Run File (thagore.runFile)
Thagore: Check File (thagore.checkFile)
Thagore: Run Selection (thagore.runSelection) — ghi đoạn chọn ra file tạm rồi chạy.
- Gõ từ khóa/snippet để nhận gợi ý; highlight tự động dựa trên grammar.
Thiết lập (Settings)
thagoreDeveloperSupport.binaryPath: đường dẫn CLI thagore (ví dụ thagore, ./target/debug/thagore, C:\\path\\to\\thagore.exe).
thagoreDeveloperSupport.defaultArgs: mảng tham số gắn thêm khi chạy/check.
thagoreDeveloperSupport.enableCodeLens: bật/tắt CodeLens Run/Check.
thagoreDeveloperSupport.enableStatusBar: bật/tắt nút status bar.
Lưu ý khi chạy
- Lệnh được chạy tại thư mục chứa file hiện tại (hoặc workspace nếu chạy selection từ file chưa lưu).
- Run Selection ghi ra file tạm rồi xóa sau khi chạy.
| |