A small GCSL language server and VS Code extension for gcsim. The project deliberately uses whole-document analysis and a thin client instead of a tinymist-style incremental compilation architecture.
.gcsllanguage registration and TextMate highlighting- Go stdio LSP lifecycle and full-document synchronization
- Locale-aware hover information for weapons, artifact sets, and each character's initial total stats
- Character action parameter and dotted field completion
- Diagnostics boundary ready for verified gcsim parser integration
- VS Code command to save and run the active script with a configured gcsim executable
- Windows x64 development layout, with Linux x64 packaging planned
The server currently publishes an empty diagnostic set. Parser integration is intentionally isolated in internal/gcs until the upstream API, error ranges, recovery behavior, and dependency size are measured. Formatting and browser-result discovery are not included yet because they require stable lossless syntax and CLI contracts.
- Go 1.27 or newer
- Node.js 22 or newer and npm
- A local gcsim executable to run simulations
From PowerShell in the repository root:
go test ./...
go build -o bin/gcsl-lsp.exe ./cmd/gcsl-lsp
Set-Location extension
npm install
npm run check
npm run compileCreate an installable Windows x64 extension from the repository root:
make vsixThe resulting package is dist/gcsl-language-support-win32-x64.vsix. It includes the compiled extension and gcsl-lsp.exe; users do not need a separate language-server installation.
Set gcsl.gcsim.path in VS Code when gcsim is not on PATH. Set gcsl.server.path only to override the development or bundled language server.
Hover names follow the VS Code display language. Chinese, English, German, Japanese, Korean, Russian, and Spanish are sourced from gcsim; unsupported client languages fall back to English. To refresh the embedded names from a sibling gcsim checkout, run node scripts/sync-localization.mjs.
Character-specific field completion descriptions come from gcsim's generated Fields/character.dm.json. Refresh them with node scripts/sync-character-fields.mjs; action parameters use node scripts/sync-action-params.mjs.
Run the build: server and compile: extension tasks, then start the Run GCSL Extension launch configuration. The Extension Development Host loads extension/out/extension.js and uses bin/gcsl-lsp.exe.
Prefer a pinned Go module dependency on github.com/genshinsim/gcsim. A Git submodule is a fallback only if parser internals or required generators are inaccessible through normal module APIs.
Before enabling real diagnostics, verify the criteria in testdata/README.md against a pinned gcsim release and a representative script containing CRLF text and non-ASCII comments. If the upstream parser cannot recover from incomplete input, retain it for authoritative validation and add a small editor-oriented parser only for interactive features.
cmd/gcsl-lsp/ server executable
internal/gcs/ upstream parser adapter boundary
internal/protocol/ minimal JSON-RPC/LSP transport
extension/ TypeScript VS Code client and language assets
testdata/ parser compatibility fixtures and guidance