# Implementation Tasks

## 1. Test Fixture Directory

- [x] 1.1 Create tests/integration/fixtures/ directory

## 2. LSP Echo Server Fixture

- [x] 2.1 Create tests/integration/fixtures/echo_lsp_server.py
- [x] 2.2 Implement stdio-based server with Content-Length header parsing
- [x] 2.3 Handle `initialize` request - respond with capabilities
- [x] 2.4 Handle `initialized` notification - no  response needed
- [x] 2.5 Handle `textDocument/didOpen` notification - store document
- [x] 2.6 Handle `shutdown` request - respond with null result
- [x] 2.7 Handle `exit` notification - terminate cleanly

## 3. LSP Integration Test File

- [x] 3.1 Create tests/integration/test_lsp_integration.py

## 4. LSP Client Initialization Test

- [x] 4.1 Add test for LSP client initial state (connected=False, etc.)

## 5. LSP Client connect_to_server() Test

- [x] 5.1 Add test for connecting to echo LSP server
- [x] 5.2 Verify subprocess is started
- [x] 5.3 Verify reader and writer are set
- [x] 5.4 Verify initialize/initialized handshake completes

## 6. LSP Client send_request() Test

- [x] 6.1 Add test for sending request and receiving response
- [x] 6.2 Add test for RuntimeError when not connected

## 7. LSP Client send_notification() Test

- [x] 7.1 Add test for sending notification without waiting
- [x] 7.2 Add test for RuntimeError when not connected

## 8. LSP Client shutdown() Test

- [x] 8.1 Add test for clean shutdown

## 9. Verification

- [x] 9.1 Run `uv run pytest tests/integration/ -v`
- [x] 9.2 Verify all LSP integration tests pass
