Skip to content

v0.3.0 Context-Aware Language Intelligence

Choose a tag to compare

@bi3lu bi3lu released this 31 May 08:40
· 10 commits to main since this release
54ed5a7

This release expands WitcherScript REDkit Tools from structural language support into context-aware editor intelligence. The language server now understands more about scopes, names, expressions, types, members, function signatures, semantic diagnostics, and REDkit-oriented workflows.

Highlights

  • Added name resolution for global, class, function, local, and parameter scopes.
  • Added local symbol lookup with correct priority for parameters and local variables.
  • Added class member lookup for fields, methods, and events.
  • Added inheritance-aware lookup for members defined on base classes.
  • Added type reference resolution for class and known type names.
  • Added context-aware completion for:
    • type positions
    • extends clauses
    • local variables
    • function parameters
    • project symbols
    • member access after .
    • import-like contexts
  • Added expression AST support for:
    • literals
    • identifiers
    • calls
    • member access
    • assignments
    • binary expressions
    • unary expressions
    • array access
  • Added type lookup for expressions and class members.
  • Added member completion based on the resolved object type.
  • Added unknown member diagnostics for invalid object.member access.
  • Added signature help for function calls, including active parameter detection.
  • Expanded semantic diagnostics for:
    • duplicate classes
    • unknown types
    • invalid inheritance
    • unknown members
    • wrong argument counts
    • wrong argument types
    • assignment type mismatches
    • return type mismatches
    • unresolved imports
  • Added real-corpus analysis tooling for larger WitcherScript sample sets.
  • Added corpus diagnostics summaries and parser coverage reporting.
  • Improved the VS Code extension with:
    • LSP status bar feedback
    • output log command
    • clearer startup errors
    • restart command polish
    • configurable workspace root and LSP path settings
  • Added REDkit workflow commands for CLI and VS Code:
    • safer init --force
    • improved validate
    • JSON validation output
    • Windows installation detection pass
    • recompile log parsing
    • VS Code recompile command
    • VS Code launch-game command
  • Added LSP diagnostics for invalid or broken witcherscript.toml configuration.
  • Expanded Python, .NET, and VS Code extension test coverage.

Changelog

Language Server

  • Implemented scope-aware name resolution.
  • Implemented class and inheritance member lookup.
  • Implemented type lookup for symbols and expressions.
  • Implemented context-aware completion behavior.
  • Implemented member access completion based on resolved types.
  • Implemented signature help through textDocument/signatureHelp.
  • Improved go to definition, hover, and completion with resolver-backed data.
  • Added config diagnostics for witcherscript.toml.
  • Improved workspace refresh behavior after config changes.

Parser and Analyzer

  • Added expression AST models.
  • Added parser support for calls, member access, assignments, binary expressions, unary expressions, and array access.
  • Added recovery behavior for malformed expressions.
  • Added semantic diagnostics using name and type information.
  • Added regression tests for expression parsing, name resolution, completion, signature help, and semantic diagnostics.

REDkit Tooling

  • Improved ws-redkit validate output.
  • Added JSON output for validation workflows.
  • Improved init --force with safer overwrite behavior and backup creation.
  • Expanded Windows 11 path detection for Steam, GOG, Epic, and SteamLibrary layouts.
  • Added structured recompile log parsing.
  • Added tests for fake filesystem detection and config writing.

VS Code Extension

  • Added status bar LSP state indicator.
  • Added WitcherScript: Show Output Logs.
  • Added WitcherScript: Restart Language Server.
  • Added WitcherScript: Recompile Scripts.
  • Added WitcherScript: Launch Game.
  • Improved REDkit config initialization from the Command Palette.
  • Added configurable LSP path, working directory, workspace root, and REDkit command settings.
  • Added TypeScript linting and checking to CI.

Testing and Quality

  • Added end-to-end language-server fixtures.
  • Added completion, definition, symbols, diagnostics, and snapshot regression tests.
  • Added corpus test runner and sample corpus fixtures.
  • Added .NET tests for REDkit detection and workflow helpers.
  • Added VS Code extension lint, type-check, compile, and smoke checks.
  • Extended CI coverage for Python, .NET, and TypeScript jobs.

Validation

The release has been verified with:

uv run ruff check .
uv run ruff format --check .
uv run mypy src/py
uv run pytest
dotnet test src/dotnet/WitcherScript.RedkitTooling.sln
npm --prefix src/vscode run lint
npm --prefix src/vscode run check
npm --prefix src/vscode run compile
git diff --check

Current test result:

76 Python tests passed
11 .NET tests passed
VS Code extension lint/check/compile passed

Notes

The language server now provides context-aware behavior instead of only returning broad keyword and project-symbol results. Completion, hover, definition, diagnostics, and signature help all use richer project, scope, and type information, making the VS Code extension significantly more useful for day-to-day WitcherScript editing.