Skip to content

Commit b14a9d2

Browse files
Format
1 parent d3e2dc2 commit b14a9d2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

AGENTS.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ This is the official ReScript VSCode extension, providing language support for R
2020
### Build System
2121

2222
The project uses:
23+
2324
- **dune**: For building OCaml components (analysis & tools)
2425
- **esbuild**: For bundling TypeScript client/server
2526
- **npm**: For JavaScript/TypeScript dependencies
@@ -28,13 +29,15 @@ The project uses:
2829
## Development Commands
2930

3031
### Initial Setup
32+
3133
```bash
3234
npm install # Install all dependencies including client/server
3335
opam switch 5.2.0 # Install OCaml switch (if not already done)
3436
opam install . --deps-only # Install OCaml dependencies
3537
```
3638

3739
### Building
40+
3841
```bash
3942
make build # Build OCaml binaries and copy to root
4043
npm run compile # Compile TypeScript (client & server)
@@ -43,6 +46,7 @@ npm run vscode:prepublish # Clean and bundle (used for publishing)
4346
```
4447

4548
### Development
49+
4650
```bash
4751
npm run watch # Watch TypeScript compilation
4852
make -C analysis test # Run analysis tests
@@ -51,31 +55,36 @@ make test # Run all tests
5155
```
5256

5357
### Code Quality
58+
5459
```bash
5560
make format # Format OCaml (dune) and JS/TS (prettier)
5661
make checkformat # Check formatting without modifying
5762
make clean # Clean build artifacts
5863
```
5964

6065
### Running the Extension in Development
66+
6167
1. Open the project in VSCode
6268
2. Press F5 to launch a new VSCode window (Extension Development Host)
6369
3. Open a ReScript project to test the extension
6470

6571
## Key Files
6672

6773
### Configuration
74+
6875
- `package.json`: Extension manifest, commands, settings, and scripts
6976
- `rescript.configuration.json`: Editor configuration for ReScript files
7077
- `client/src/extension.ts`: Extension entry point and client initialization
7178
- `server/src/server.ts`: Language server implementation
7279
- `server/src/cli.ts`: CLI entry point for the language server
7380

7481
### OCaml Components
82+
7583
- `analysis/`: Code analysis binary (hover, autocomplete, etc.)
7684
- `tools/`: ReScript tools binary (interface generation, etc.)
7785

7886
### Language Features
87+
7988
- **LSP Features**: hover, goto definition, find references, rename, autocomplete
8089
- **Code Analysis**: dead code detection, exception analysis (via reanalyze)
8190
- **Build Integration**: compile diagnostics, status indicators
@@ -84,6 +93,7 @@ make clean # Clean build artifacts
8493
## Testing
8594

8695
The project has several test suites:
96+
8797
- `analysis/tests/`: Tests for the analysis binary
8898
- `tools/tests/`: Tests for ReScript tools
8999
- `analysis/tests-incremental-typechecking/`: Incremental typechecking tests
@@ -96,4 +106,4 @@ The project has several test suites:
96106
- Native binaries are cross-platform (darwin, linux, win32) and included in the extension
97107
- Supports workspace configurations and monorepo structures
98108
- Incremental type checking can be enabled for better performance on large projects
99-
- As mentioned above the native OCaml binaries here are only here for backwards-compatibility with ReScript versions 11 or below. Since ReScript 12 both `analysis` and `tools` are part of the ReScript compiler monorepo, thus refrain from changing them too much (bugfixes that need to be ported are ok).
109+
- As mentioned above the native OCaml binaries here are only here for backwards-compatibility with ReScript versions 11 or below. Since ReScript 12 both `analysis` and `tools` are part of the ReScript compiler monorepo, thus refrain from changing them too much (bugfixes that need to be ported are ok).

0 commit comments

Comments
 (0)