Skip to content

Editor Integration

Chloë Strainge edited this page Oct 15, 2026 · 2 revisions

VS Code and language-server support

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.

Select a server

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).

What the server supplies

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

Clone this wiki locally