Stag Programming Language for Visual Studio Code
Official syntax highlighting and Language Server Protocol (stag-lsp) integration for the Stag programming language.
Features
- Syntax Highlighting: Full TextMate grammar for
.stag source files (records, choices, traits, attach blocks, generics, f-strings, zones, inline assembly, and Standard Kit imports).
- Live Diagnostics: Real-time lexer, parser, semantic, memory-analysis, and style errors/warnings powered by
stag-lsp.
- Hover & Signature Help: Inspect inferred types, function signatures, and parameter details on hover or while typing calls.
- Go to Definition & Document Symbols: Navigate to user declarations and embedded Standard Kit (
kit.*) symbols.
- Completions: Context-aware member completions,
use kit. module discovery, and symbol imports.
- Formatting: Format documents through
stag-lsp (beta formatter).
Requirements
Install the Stag toolchain (stagc and stag-lsp) from https://stag-lang.github.io or GitHub Releases.
Extension Settings
| Setting |
Default |
Description |
stag.lsp.enabled |
true |
Enable or disable the native Stag Language Server (stag-lsp). |
stag.lsp.path |
"" |
Custom path to stag-lsp. Leave empty for automatic detection on PATH and standard install directories. |
Commands
- Stag: Restart Language Server (
stag.restartLsp) — restarts the background stag-lsp process.
Links
| |