You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Project Overview
6
+
7
+
CWTools is a Visual Studio Code extension that provides language services for Paradox Interactive game modding, supporting games like Stellaris, Hearts of Iron IV, Europa Universalis IV, Crusader Kings II/III, Victoria 2/3, and Imperator: Rome. The extension offers syntax validation, autocomplete, tooltips, localization checking, and visual graph analysis for game scripts.
8
+
9
+
## Architecture
10
+
11
+
This is a hybrid .NET/TypeScript VS Code extension with three main components:
12
+
13
+
### Backend (.NET/F#)
14
+
-**Main** (`src/Main/`): Core F# language server providing validation, completion, and analysis
15
+
-**LSP** (`src/LSP/`): Language Server Protocol implementation in F#
1. Use `./build.cmd QuickBuild` for initial setup and F# server compilation
70
+
2. Use `npm run compile` for TypeScript changes during development
71
+
3. Debug by launching "Launch Extension" configuration in VS Code
72
+
4. Test with sample Paradox game mod files in `client/test/sample/`
73
+
5. Run tests with `npm test` before committing changes
74
+
75
+
## CWTools Integration
76
+
77
+
The extension integrates with the CWTools library (F# game script parser/validator) via git submodule. The build system automatically pulls the latest CWTools when building the language server.
3. Follow the prompts to select your vanilla folder
47
+
4. Edit files and watch syntax errors show up when you make mistakes
48
+
5. Wait up to a minute for the extension to scan your mod and find errors
49
+
50
+
### Multiple mods - workspace
51
+
52
+
If you have multiple mods that need to be loaded at once, use VS Code's [multi-root workspace](https://code.visualstudio.com/docs/editing/workspaces/workspaces#_untitled-multiroot-workspaces) feature.
53
+
54
+
1. Open your first mod
55
+
2. Use "File", "Add folder to workspace" to add your next mod
56
+
3. cwtools should reload including both mods and vanilla in context using correct mod load order
57
+
58
+
If you want to browse vanilla files, you can use the "CWTOOLS LOADED FILES" section in the Explorer tab.
0 commit comments