Server/: Delphi (Object Pascal) language server core (dwsc.dpr, unitsdwsc.*.pas).Binaries/: Built artifacts (e.g.,dwsc.exe).Clients/VSCode/: VS Code client extension (activation, grammar, snippets,bin/dwsc.exe).UnitTest/: Delphi unit tests (e.g.,dwscTest.dpr).Tests/Protocol/: LSP protocol tests (pytest-lsp) and corpus.Test/: DWScript sample programs used during development.DWScript/: DWScript compiler/library (git submodule).
- Build (Delphi): compile
Server/dwsc.dpr→Binaries/dwsc.exe(IDE ordcc32/dcc64). - Run (stdio):
Binaries/dwsc.exe -type=ls - Run (TCP dev):
Binaries/dwsc.exe -type=ls -tcp=8765 - Unit tests (Delphi):
cd UnitTest && dcc32 dwscTest.dpr && .\dwscTest.exe - Protocol tests (pytest):
pytest Tests/Protocol/test_lifecycle.py -v - Manual TCP check:
python .\test_tcp_client.py(expects server on127.0.0.1:8765).
- Pascal (server): 2-space indentation;
PascalCasefor types (TMyType) and methods; units nameddwsc.*.pasby feature area. - JavaScript (VS Code client): 2 spaces; prefer descriptive names; keep entry in
src/dwsc.jsminimal and delegate to server. - Logs/config: prefer
-LSPTrace=off|messages|verbose, optional-LSPLogPath=<path>.
- Frameworks: Delphi unit tests plus Python
pytest-lspfor LSP lifecycle. - Naming: Delphi tests in
UnitTest/; protocol tests underTests/Protocol/astest_*.py. - Coverage: include tests for initialize/shutdown and any new requests; add fixture corpus to
Tests/Protocol/corpus/when relevant.
- Commits: favor Conventional Commits (e.g.,
feat:,fix:,chore:). Keep focused; reference files/units touched. - PRs: include summary, linked issues, test plan (stdio + TCP), and logs/screenshots when applicable (
-LSPTrace=messages|verbose). UpdateREADME.md/PLAN.mdif behavior or roadmap changes.
- Never log sensitive project code when using
-LSPTrace=verbose. - When testing TCP, bind to localhost only (
-tcp=8765). - VS Code client uses
Clients/VSCode/bin/dwsc.exeby default; adjustdwsc.pathif pointing toBinaries/dwsc.exe.