Skip to content

Commit dabd0e6

Browse files
Add LSP
1 parent c2e5314 commit dabd0e6

9 files changed

Lines changed: 1975 additions & 596 deletions

File tree

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Changelog
2+
3+
## [0.4.0] - LSP Server Support
4+
5+
### Added
6+
- **LSP Server Mode**: Cashmere can now run as a Language Server Protocol (LSP) server
7+
- Start with `cashmere --lsp` command
8+
- Provides real-time diagnostics in your editor as you type
9+
- Works with VS Code, Neovim, Helix, Emacs, Sublime Text, and other LSP-compatible editors
10+
- Full support for all existing lint rules
11+
12+
### Changed
13+
- Refactored linting logic into separate module (`src/linter.rs`) for reusability
14+
- Added async runtime support using Tokio
15+
- Main function now supports both CLI and LSP modes
16+
17+
### Technical Details
18+
- Uses `tower-lsp` crate for LSP implementation
19+
- Maintains document state with `DashMap` for thread-safe concurrent access
20+
- LSP server provides:
21+
- `textDocument/didOpen`: Lint files when opened
22+
- `textDocument/didChange`: Lint files as you type
23+
- `textDocument/didSave`: Re-lint files on save
24+
- `textDocument/didClose`: Clean up document state
25+
26+
### Dependencies
27+
- Added `tower-lsp` v0.20
28+
- Added `tokio` v1 (with full features)
29+
- Added `dashmap` v5
30+
- Added `serde` v1
31+
- Added `serde_json` v1
32+
33+
### Documentation
34+
- Updated README.md with LSP usage instructions
35+
- Added LSP_SETUP.md with detailed editor integration guides
36+
- Added examples/workflow_example.ts demonstrating correct and incorrect patterns
37+
38+
## [0.3.0] and earlier
39+
- CLI-only linter for Cloudflare Workflows
40+
- Detects unawaited step.do(), step.sleep(), step.waitForEvent(), and step.sleepUntil() calls
41+
- Tracks promises across variable assignments
42+
- Supports Promise.all, Promise.race, Promise.allSettled, and Promise.any patterns

0 commit comments

Comments
 (0)