Syntax highlighting, diagnostics, and editing support for the Sigil programming language.
- TypeScript 56%
- JavaScript 44%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
ci / build (push) Successful in 9m46s
Reviewed-on: #1 |
||
| .forgejo/workflows | ||
| scripts | ||
| snippets | ||
| src | ||
| static | ||
| syntaxes | ||
| .gitignore | ||
| .vscodeignore | ||
| language-configuration.json | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Sigil Language Support for Visual Studio Code
Syntax highlighting, diagnostics, and editing support for the Sigil programming language (.sl files) in Visual Studio Code.
Features
- Syntax Highlighting for keywords, types, strings, numbers, operators, decorators, and string interpolation.
- Diagnostics via the Sigil compiler (
sigil --check --format=json) on save. - Offside Folding based on the language's indentation-significant syntax.
- Smart Indentation after
:-terminated lines andelse/elifcontinuations. - Bracket Matching for
(),[],{}. - Comment Toggling with
#(Ctrl/Cmd +/). - Auto-Closing Pairs for brackets, quotes, and backticks.
- Snippets for
fn,class,if/else,for,loop,lambda,pipe, and more.
Requirements
The diagnostics feature needs the Sigil compiler installed locally. By default the extension invokes:
uv run python -m src.main --check --format=json <file>
from a clone of the compiler repo. Override the command, arguments, and working directory under Settings > Sigil.
Installation
- Open Visual Studio Code.
- Launch the Command Palette (Ctrl/Cmd + Shift + P).
- Run Extensions: Install Extensions.
- Search for Sigil Language Support and install it.
- Reload VS Code if prompted.
Usage
The extension activates automatically when a .sl file is opened. Diagnostics refresh on save; you can also run Sigil: Check File from the palette.
Example
# Single-line comment
const PI = 3.14159
let message: string = 'Hello, World!'
let interpolated: string = `Your value is {PI}`
fn greet(name: string) -> string:
return `Hello, {name}!`
class Calculator:
pub fn add(a: int32, b: int32) -> int32:
return a + b
let result = Calculator.add(10, 20)
if result > 25:
loop:
print('Result is greater than 25')
break
else:
print('Result is not greater than 25')
Settings
| Key | Default | Description |
|---|---|---|
sigil.diagnostics.enable |
true |
Run the compiler on save and surface diagnostics inline. |
sigil.compiler.command |
uv |
Command used to run the Sigil compiler. |
sigil.compiler.args |
["run", "python", "-m", "src.main"] |
Arguments preceding the file path. The extension appends --check --format=json <file>. |
sigil.compiler.cwd |
"" |
Working directory of the compiler. Empty triggers auto-discovery. |
sigil.compiler.timeoutMs |
15000 |
Cancel a check run that takes longer than this. |
Contributing
Issues and pull requests: rdenadai/sigil-vscode-language-support.
License
MIT.
