Syntax highlighting, snippets, a bundled tish-lsp language server, and build tasks for the Tish language.
| Feature | Details |
|---|---|
| Languages | Tish (tish): .tish only; JSX uses the same grammar and LSP as plain Tish. |
| Snippets | fn, afn, for, try, import, … |
| LSP | The tish-lsp binary is bundled in the extension (platform-specific .vsix) — no download, no Rust toolchain. Pinned via the @tishlang/tish-lsp dependency (currently 2.1.0, tish/lattish 2.x): scope-aware go-to-definition, hover, references, rename, lexical completion, diagnostics (tishlang_lint), and formatting (tishlang_fmt). Override with tish.languageServerPath or tish-lsp on PATH. |
| Format on save | Off by default (tish.format.enable). Enabling it runs tish-fmt via the server: it does not keep comments and normalizes layout (JSX gets re-indented). Use Format Document manually when you want that. |
| Tasks | Example tasks: run file, native compile (see below) |
| Problem matchers | tish-compile, tish-rustc for compile output |
- Confirm the extension is actually installed — In Extensions, search Tish (
tish.tish-extension). Opening only thetishcompiler repo does not load the VS Code extension from disk; you must install it (marketplace / Open VSX / “Install from VSIX”) or use Run Extension from a checkout oftish-vscode. Thetishrepo includes.vscode/extensions.jsonrecommending this extension when your editor supports it. - Prove activation — Command Palette → “Tish: Show Extension Output” (or “Tish: Show Language Server Output”). In Output → “Tish Extension” you should see
Tish extension activatedwithin a few lines. If those commands are missing, the extension is not loaded. Developer: Show Running Extensions should list Tish. - Workspace Trust (Restricted Mode) — This extension declares limited trust support: syntax and the bundled
tish-lspstill work. A workspace-leveltish.languageServerPath(which could point at an arbitrary executable) is ignored unless you trust the workspace. - Language mode — Bottom-right must show Tish (not Plain Text). Save as
*.tishor use Change Language Mode.
These come from tish-lsp, not from TextMate grammar. After opening a .tish file, check Output → Tish Language Server for tish-lsp ready.
- Bundled binary —
tish-lspships inside the extension; no install needed. To override (a custom build, or an unsupported arch) settish.languageServerPathto atish-lspbinary, or put one on PATH (npm i -g @tishlang/tish-lsp), then reload. - Cursor on an identifier — Cmd/Ctrl+click or Go to Definition on the name of a call/local (
fooinfoo()), not on punctuation. - Trace — Set
tish.trace.servertoverboseto confirmtextDocument/definition/textDocument/hoverrequests in the output channel.
Lint vs format: Red/yellow squiggles are diagnostics (parse + tish-lint). Format document / format-on-save uses tish_fmt and is lossy (comments removed). Keep format-on-save off unless you want normalized code.
- Language server — No manual install, no download: the
tish-lspbinary for your OS/arch ships inside the platform-specific.vsix. tishon PATH — Only if you use Run/Compile tasks.- Custom builds: set
tish.languageServerPathto your owntish-lsp, or put one on PATH.
The bundled tish-lsp (server/tish-lsp inside the extension) couldn’t run. Common causes:
- Wrong-platform
.vsix— Install from the Marketplace / Open VSX, which serve the platform-specific build automatically. Installing a.vsixfor another OS/arch by hand ships the wrong binary. - Unsupported OS/arch — If there’s no bundled binary for your platform, set
tish.languageServerPathto atish-lspyou built or installed (npm i -g @tishlang/tish-lsp), then Reload Window. - Override points nowhere — If you set
tish.languageServerPath, make sure it’s an existing, runnabletish-lsp.
- Bump the
@tishlang/tish-lspdevDependency inpackage.jsonto ship a newer language server, thennpm i. CI builds one platform-specific.vsixper target, each bundling that platform’stish-lsp(staged from the npm package byscripts/stage-lsp.cjsviaTISH_LSP_TARGET). - The binary is bundled, not downloaded — there is no runtime fetch.
| Setting | Description |
|---|---|
tish.languageServerPath |
Path to a tish-lsp that overrides the bundled one |
tish.trace.server |
LSP trace |
tish.format.enable |
Format on save |
Add to .vscode/tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "tish: run current file",
"type": "shell",
"command": "tish",
"args": ["run", "${file}"],
"group": "test",
"problemMatcher": []
},
{
"label": "tish: build (native)",
"type": "shell",
"command": "tish",
"args": ["build", "${file}", "--output", "${workspaceFolder}/tish_out", "--target", "native"],
"group": "build",
"problemMatcher": ["$tish-rustc"]
}
]
}npm install
npm run compilePress F5 for Extension Development Host. For LSP during dev, either allow download or set tish.languageServerPath in settings.
If you previously set files.associations to language tish-jsx, change it to tish (the tish-jsx language id has been removed).
You always have two windows: (1) the tish-vscode window where you pressed F5 (the debugger), and (2) the [Extension Development Host] window that opens (this is the “fake” Cursor/VS Code running your local extension).
Do the checks below in the Extension Development Host window, not in the debugger window.
- Launch config — Prefer Run Extension (rebuild local tish-lsp) so
../tish/target/debug/tish-lspis built and picked up automatically (requires a sibling checkout of the compiler repo next totish-vscode). Otherwise use Run Extension and settish.languageServerPathin the Host’s settings to your binary. - Open a real folder in the Host — File → Open Folder… and choose the
tishcompiler repo (or any project that contains*.tish). Until a folder is open, you may not see much LSP traffic. - Output channels — The extension uses two logs (both under View → Output):
- “Tish Extension” — always has a short boot banner; enable
tish.debug.extension(or Tish: Toggle Extension Debug Logging) for[tish-ext …]resolver / client-start detail. - “Tish Language Server” — download /
Using language server: …,tish-lsp started, LSP failures, andtish.trace.serverJSON-RPC.
If “Tish Extension” never showsTish extension activated, the extension did not activate (wrong window, or extension failed to load). Iftish-lsp startednever appears on the language-server channel, scroll for errors or see the warning toast.
- “Tish Extension” — always has a short boot banner; enable
- Command Palette — In the Host: Tish: Show Extension Output or Tish: Show Language Server Output (forces activation and focuses the matching log).
- LSP wire trace — In the Host open Settings (JSON) and set
"tish.trace.server": "verbose", then Reload Window in the Host. The same “Tish Language Server” output will log JSON-RPC (initialize,textDocument/didOpen,textDocument/publishDiagnostics, etc.). Set back to"off"when finished. - Breakpoints (extension TypeScript) — In the debugger (tish-vscode) window, open
src/extension.ts/src/downloadLsp.tsand set breakpoints on the lines afterresolveLanguageServerExecutableand aroundclient.start(). They hit when the Host activates the extension (e.g. when you open a.tishfile or run the command from step 4). - Running extensions — In the Host: Developer: Show Running Extensions and confirm Tish is listed and not disabled.
- Sanity test — In the Host, open a
.tishfile, confirm the status bar language is Tish, introduce a parse error or unknown identifier and confirm squiggles / hover.
Debugging the Rust tish-lsp binary itself is separate: build with debug symbols from ../tish, then attach a native debugger to the spawned tish-lsp process, or run tish-lsp under lldb/gdb from a terminal and point tish.languageServerPath at that binary while testing from the Host.
Same pattern as tish: CI workflow plus separate release workflows per registry.
| Workflow | Trigger | Purpose |
|---|---|---|
vscode-ci.yml |
push/PR to main, workflow_dispatch | Build VSIX, release_check (conventional commits), create prerelease with tish.vsix. Mirrors build-npm-binaries.yml. |
vscode-release.yml |
release published/edited | When prerelease promoted to full: download VSIX from release, publish to Visual Studio Marketplace. Mirrors npm-release.yml. |
open-vsx-release.yml |
release published/edited | Same trigger: download VSIX, publish to Open VSX (VSCodium, etc.). |
VSCE_PAT— Visual Studio Marketplace (vscode-release).VSX_TOKEN— Open VSX (create token; sign publisher agreement first).- Conventional commits — feat/fix/perf/BREAKING CHANGE required for main merge.
- Bump the
@tishlang/tish-lspdevDependency to ship a newer language server; each platform.vsixbundles that version’stish-lsp.