v0.2.0 WitcherScript LSP, REDkit Tooling, and VS Code Harness
This release turns the project from a language-core foundation into a usable developer tooling stack. It adds core Language Server Protocol features, workspace/project indexing, semantic diagnostics, REDkit CLI integration, a VS Code extension harness, and end-to-end fixture coverage.
Highlights
-
Implemented a functional WitcherScript language server with:
initializeinitializedtextDocument/didOpentextDocument/didChangetextDocument/didSaveworkspace/didChangeWatchedFilesworkspace/executeCommandtextDocument/publishDiagnostics
-
Added editor-facing LSP features:
- document symbols
- workspace symbols
- go to definition
- hover
- completion
- references
-
Added project-aware workspace support through
witcherscript.toml. -
Added workspace scanning with:
source_rootsvanilla_rootsexcluderules
-
Added project-wide symbol indexing for:
- classes
- states
- functions
- events
- fields
- local declarations
-
Added semantic diagnostics for:
- duplicate symbols
- unknown types
- missing base classes
- unknown identifiers
- function call argument count mismatches
-
Added REDkit C# tooling CLI commands:
detectinitprint-configvalidaterecompilelaunch-game
-
Added
witcherscript.tomlgeneration through REDkit tooling. -
Added LSP refresh command for live project reloads:
witcherscript.refreshIndex
-
Added a VS Code extension harness for testing the language server in a real editor.
-
Added TypeScript tooling for the VS Code extension:
- TypeScript compile check
- ESLint
- GitHub Actions CI job
-
Added end-to-end fixture tests for:
- diagnostics
- completion
- go to definition
- document symbols
- workspace symbols
- AST snapshots
- larger project indexing
Changelog
Language Server
- Added full-document synchronization for opened, changed, and saved
.wsfiles. - Added diagnostic publication from lexer, parser, and semantic analysis.
- Added project index refresh for watched file changes.
- Added
workspace/executeCommandsupport. - Added
witcherscript.refreshIndexfor reloadingwitcherscript.tomlwithout restarting the server. - Added completion results for WitcherScript keywords and indexed project symbols.
- Added document outline support from indexed AST declarations.
- Added workspace-wide symbol search.
- Added definition lookup for indexed symbols.
- Added hover information for known symbols.
- Added simple reference lookup across indexed files.
Parser and Analysis
- Expanded parser support for structural declarations, function bodies, local variables, and statements.
- Added symbol table, scope model, type references, and inheritance index.
- Added semantic diagnostic rules for common project-level mistakes.
- Improved import resolution support in the project index.
- Fixed an import-cycle issue around workspace config compatibility exports.
REDkit Tooling
- Added REDkit project detection.
- Added game and REDkit installation detection with manual path support.
- Added content repository modeling for vanilla, DLC, mod, and project repositories.
- Added project validation output.
- Added TOML export for the language server.
- Added process adapters for recompilation and game launch commands.
- Organized C# tooling into focused directories.
- Added XML documentation comments for public C# API types and methods.
VS Code Extension
- Added a minimal VS Code extension under
src/vscode. - Added
.wslanguage activation. - Added configurable language server startup.
- Added command palette entries:
WitcherScript: Refresh Project IndexWitcherScript: Initialize REDkit ConfigWitcherScript: Restart Language Server
- Added Extension Host debug configuration.
- Added local extension documentation.
- Added ESLint and TypeScript CI checks.
Tests and Fixtures
- Added project fixtures:
minimal_projectbasic_projectbroken_projectlarger_project
- Added end-to-end tests over real fixture workspaces.
- Added AST snapshot coverage for fixture projects.
- Added performance-oriented indexing regression coverage.
- Expanded LSP tests for diagnostics, symbols, completion, definition, references, hover, watched files, and index refresh.
Validation
The release has been verified with:
uv run ruff check .
uv run ruff format --check .
uv run mypy src/py
uv run pytest
npm --prefix src/vscode run lint
npm --prefix src/vscode run check
npm --prefix src/vscode run compile
dotnet test src/dotnet/WitcherScript.RedkitTooling.slnCurrent test result:
49 Python tests passed
6 .NET tests passed
VS Code extension lint/check/compile passed
Notes
The language server can now be tested directly in VS Code through the extension harness in src/vscode. The REDkit CLI can generate witcherscript.toml, and the running language server can reload that configuration through witcherscript.refreshIndex without restarting the editor.