| Crates.io | sigil-oracle |
| lib.rs | sigil-oracle |
| version | 0.3.0 |
| created_at | 2026-01-16 07:58:09.535135+00 |
| updated_at | 2026-01-18 04:11:49.988406+00 |
| description | Oracle - Language Server Protocol implementation for Sigil |
| homepage | https://sigil-lang.com |
| repository | https://github.com/Daemoniorum-LLC/sigil-lang |
| max_upload_size | |
| id | 2048136 |
| size | 146,402 |
Oracle is the Language Server Protocol (LSP) implementation for the Sigil programming language. It provides IDE features for both human developers and AI agents.
cd sigil/tools/oracle
cargo build --release
The binary will be at target/release/sigil-oracle.
# Add to your shell profile
export PATH="$PATH:/path/to/sigil/tools/oracle/target/release"
Oracle communicates via stdio using the Language Server Protocol.
sigil-oracle is in your PATH.sigil or .sg filerequire('lspconfig').sigil_oracle.setup{
cmd = { "sigil-oracle" },
filetypes = { "sigil" },
root_dir = function(fname)
return require('lspconfig').util.find_git_ancestor(fname)
end,
}
Add to languages.toml:
[[language]]
name = "sigil"
scope = "source.sigil"
file-types = ["sigil", "sg"]
language-server = { command = "sigil-oracle" }
Oracle is designed to work well with AI agents that generate Sigil code:
# AI can check its generated code by:
# 1. Writing to a .sigil file
# 2. Opening it in an editor with Oracle
# 3. Reading diagnostics from the LSP
# Or programmatically via the LSP protocol
import subprocess
import json
# Start Oracle
proc = subprocess.Popen(
['sigil-oracle'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
# Send LSP initialize request
# ... (standard LSP protocol)
| Feature | Status |
|---|---|
| textDocument/publishDiagnostics | ✅ |
| textDocument/hover | ✅ |
| textDocument/completion | ✅ |
| textDocument/definition | 🚧 Planned |
| textDocument/references | 🚧 Planned |
| textDocument/formatting | 🚧 Planned |
| textDocument/semanticTokens | 🚧 Planned |
Oracle respects the following environment variables:
RUST_LOG: Set to sigil_oracle=debug for verbose loggingSIGIL_ORACLE_CACHE: Directory for caching parsed files (default: none)┌─────────────────────────────────────────────────────────┐
│ Oracle LSP │
├─────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │ Lexer │→ │ Parser │→ │ Type Checker │ │
│ │ (sigil_parser)│ │(sigil_parser)│ │ (sigil_parser) │ │
│ └─────────────┘ └─────────────┘ └─────────────────┘ │
│ ↓ ↓ ↓ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ Diagnostics & Analysis │ │
│ └──────────────────────────────────────────────────┘ │
│ ↓ ↓ ↓ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │ Hover │ │ Completions │ │ Diagnostics │ │
│ └─────────────┘ └─────────────┘ └─────────────────┘ │
└─────────────────────────────────────────────────────────┘
↓ (LSP JSON-RPC over stdio)
┌─────────────────────────────────────────────────────────┐
│ Editor / AI Agent │
└─────────────────────────────────────────────────────────┘
MIT License - Daemoniorum, Inc.