GreyCat for Visual Studio Code
Language support for GreyCat (.gcl) — completion, diagnostics, formatting, hover, goto-definition, rename, code actions. Backed by the language server built into the greycat CLI.
Language server
The extension runs greycat lsp over LSP. Install GreyCat (see greycat.io) and make sure greycat is on your PATH.
To use a specific binary, set greycat.serverPath to the command or absolute path and greycat.serverArgs to its arguments (e.g. a local dev build). This overrides greycat lsp.
Activation
Auto-activates when the workspace contains a project.gcl. The entrypoint's @library / @include pragmas define the analyzed module set — there is no flat directory walk, so projects nested in subfolders work as long as each has its own project.gcl.
Settings
| Setting |
Default |
What it does |
greycat.trace.server |
info |
LSP server log verbosity. off / info / debug / trace. Output goes to the GreyCat output channel. |
greycat.lintLibs |
false |
Surface lint warnings for vendored modules under lib/<name>/. Off by default so your own code's signal doesn't drown in stdlib noise. Type-relation diagnostics always surface. |
greycat.diagnosticsDebounceMs |
150 |
Debounce window (ms) between full analyzer publishes while you type. 0 runs the analyzer on every keystroke. |
greycat.serverPath |
"" |
Command or absolute path used to launch the server. Defaults to greycat. |
greycat.serverArgs |
[] |
Arguments passed to the server command. Defaults to ["lsp"]. |
Changes to these settings prompt you to restart the server.
Commands
| Command |
Action |
GreyCat: Restart LSP Server |
Stop and re-spawn the LSP server. |
Troubleshooting
greycat not found. Install GreyCat (see greycat.io) and make sure greycat is on your PATH, then restart VS Code so it picks up the updated environment. To use a binary elsewhere, set greycat.serverPath (and greycat.serverArgs if its subcommand differs).
Suggestions not appearing on macOS. Ctrl+Space may be claimed by the system "Select previous input source" shortcut. Disable it under System Settings -> Keyboard -> Keyboard Shortcuts -> Input Sources, then restart VS Code.
Stale diagnostics or hover. Run GreyCat: Restart LSP Server from the command palette. If the issue reproduces from a clean restart, please file an issue with a minimal repro.
Bugs and feedback
Report issues at hub.datathings.com/greycat-oss/vscode-greycat/-/issues.
License
MIT.