Repository navigation
Editor Integration
The VS Code extension is Shelly Shell, identifier cstrainge.shelly-shell.
It associates .shy files with Shelly and launches the installed executable's
--language-server mode over standard input/output.
Classic Vim can use the same server through the repository's Vim adapter.
Install the extension from the Marketplace or use VS Code's Extensions: Install from VSIX… command. A VS Code VSIX should be installed through VS Code, rather than the separate Visual Studio extension installer.
By default the extension finds shelly through PATH. Set
shelly-shell.serverPath to a compatible executable when necessary:
{
"shelly-shell.serverPath": "/home/you/workdir/shelly/target/debug/shelly"
}In WSL or another remote workspace, install the extension on the workspace side
and choose a server path valid there. After changing the executable, run
Shelly: Restart Language Server. Trace communication with
shelly-shell.trace.server (off, messages, or verbose).
The current server advertises full-document synchronization, diagnostics, hover,
completion, and semantic tokens. Completion triggers include ., :, and $.
LSP positions use UTF-16 coordinates; internal source spans are translated rather
than confusing byte offsets with editor columns.
Semantic tokens use parser context and known symbols for language roles. VS Code and the selected theme choose the final colors. A small lexical grammar supplies comment/string boundaries so bracket matching does not treat quoted brackets as code; semantic analysis supplies the richer language classification.
The server analyzes source without executing documents or loading their code. Workspace trust is required to select a server executable through workspace settings. Use VS Code's token inspector when checking theme support, and the Shelly output channel when diagnosing process startup or a mismatched executable version.
Related: Vim integration · REPL highlighting · Running Shelly · Language map
Begin here
Values and expressions
- Language basics
- Variables and scope
- Numbers and logic
- Strings and paths
- Arrays
- Hash maps
- Ranges and iteration
- Control flow
- Match and type guards
Functions and types
- Functions and calls
- Closures and function types
- Methods and properties
- Structs
- Enums
- Named types and unions
- Conversions
- Types and properties
Shell and modules
- Pipelines
- Pipeline splits
- Pipeline formats
- Commands and exit status
- Redirection
- Environment and exported variables
- Modules and visibility
- Nested modules and directory packages
- Conditional imports and declarations
- Errors and cleanup
- Supervised processes and terminals
Library guides
- Standard library
- The implicit prelude
- Bytes, files, readers, and writers
- Explicit item streams
- JSON documents and typed mapping
- Sockets, DNS, and TLS
- HTTP clients
- HTTP servers
- Framing, server-sent events, and JSON-RPC
- Terminal colors, styles, and geometry
- Build an application console
Interactive use