Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### New Features

- **LSP Readiness Tool**: Added `wait_for_lsp_ready` tool for ensuring LSP client
readiness before performing operations, improving reliability of LSP workflows

### Improved

- **Configurable LSP Timeout**: Added `NeovimClientConfig` with configurable LSP
timeout settings (default: 3000ms) for better control over LSP operation timing
- **Enhanced Notification Tracking**: Comprehensive notification tracking system
for robust LSP synchronization and event handling
- **Autocmd Setup**: Unified autocmd setup replacing diagnostics-specific
implementation with more comprehensive event handling
- **Test Performance**: Optimized integration tests with better timing and
one-time binary compilation for improved CI performance

## [v0.5.0] - 2025-08-20

### Fixed
Expand Down
43 changes: 25 additions & 18 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ The codebase follows a modular architecture with clear separation of concerns:
- Supports both TCP and Unix socket/named pipe connections
- Provides high-level operations: buffer management, diagnostics, LSP integration
- Handles Lua code execution and autocmd setup
- Includes configurable LSP timeout settings via `NeovimClientConfig`
- Features comprehensive notification tracking system for LSP synchronization
- Provides methods for waiting on LSP readiness and diagnostic availability

- **`src/neovim/connection.rs`**: Connection management layer
- Wraps `nvim-rs` client with lifecycle management
Expand Down Expand Up @@ -210,7 +213,7 @@ This modular architecture provides several advantages:

### Available MCP Tools

The server provides these 23 tools (implemented with `#[tool]` attribute):
The server provides these 24 tools (implemented with `#[tool]` attribute):

**Connection Management:**

Expand All @@ -224,30 +227,31 @@ The server provides these 23 tools (implemented with `#[tool]` attribute):

1. **`list_buffers`**: List all open buffers for specific connection
2. **`exec_lua`**: Execute arbitrary Lua code in specific Neovim instance
3. **`buffer_diagnostics`**: Get diagnostics for specific buffer on specific connection
4. **`lsp_clients`**: Get workspace LSP clients for specific connection
5. **`lsp_workspace_symbols`**: Search workspace symbols by query on specific
3. **`wait_for_lsp_ready`**: Wait for LSP client to be ready and attached with timeout
4. **`buffer_diagnostics`**: Get diagnostics for specific buffer on specific connection
5. **`lsp_clients`**: Get workspace LSP clients for specific connection
6. **`lsp_workspace_symbols`**: Search workspace symbols by query on specific
connection
6. **`lsp_code_actions`**: Get LSP code actions with universal document
7. **`lsp_code_actions`**: Get LSP code actions with universal document
identification (supports buffer IDs, project-relative paths, and absolute paths)
7. **`lsp_hover`**: Get LSP hover information with universal document
8. **`lsp_hover`**: Get LSP hover information with universal document
identification (supports buffer IDs, project-relative paths, and absolute paths)
8. **`lsp_document_symbols`**: Get document symbols with universal document
9. **`lsp_document_symbols`**: Get document symbols with universal document
identification (supports buffer IDs, project-relative paths, and absolute paths)
9. **`lsp_references`**: Get LSP references with universal document
10. **`lsp_references`**: Get LSP references with universal document
identification (supports buffer IDs, project-relative paths, and absolute paths)
10. **`lsp_resolve_code_action`**: Resolve code actions that may have
11. **`lsp_resolve_code_action`**: Resolve code actions that may have
incomplete data
11. **`lsp_apply_edit`**: Apply workspace edits using Neovim's LSP utility
12. **`lsp_apply_edit`**: Apply workspace edits using Neovim's LSP utility
functions
12. **`lsp_definition`**: Get LSP definition with universal document identification
13. **`lsp_type_definition`**: Get LSP type definition with universal document identification
14. **`lsp_implementations`**: Get LSP implementations with universal document identification
15. **`lsp_declaration`**: Get LSP declaration with universal document identification
16. **`lsp_rename`**: Rename symbol across workspace using LSP
17. **`lsp_formatting`**: Format document using LSP with optional auto-apply
18. **`lsp_range_formatting`**: Format a specific range in a document using LSP
19. **`lsp_organize_imports`**: Sort and organize imports using LSP with
13. **`lsp_definition`**: Get LSP definition with universal document identification
14. **`lsp_type_definition`**: Get LSP type definition with universal document identification
15. **`lsp_implementations`**: Get LSP implementations with universal document identification
16. **`lsp_declaration`**: Get LSP declaration with universal document identification
17. **`lsp_rename`**: Rename symbol across workspace using LSP
18. **`lsp_formatting`**: Format document using LSP with optional auto-apply
19. **`lsp_range_formatting`**: Format a specific range in a document using LSP
20. **`lsp_organize_imports`**: Sort and organize imports using LSP with
auto-apply by default

### Universal Document Identifier System
Expand Down Expand Up @@ -505,6 +509,9 @@ the new `lua_tools.rs` module:
lsp_apply_edit
- **Test data**: Includes Go source files and LSP configuration for realistic
testing scenarios
- **Enhanced reliability**: Robust LSP synchronization with notification tracking
- **Optimized timing**: Better test performance with improved setup and teardown
- **Notification testing**: Unit tests for notification tracking system

## Error Handling

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ and resources - only the transport layer changes.

## Available Tools

The server provides 23 MCP tools for interacting with Neovim:
The server provides 24 MCP tools for interacting with Neovim:

### Connection Management

Expand Down Expand Up @@ -366,6 +366,11 @@ providing enhanced flexibility for code analysis and navigation.
- **`exec_lua`**: Execute Lua code in Neovim
- Parameters: `connection_id` (string), `code` (string) - Lua code to execute

- **`wait_for_lsp_ready`**: Wait for LSP client to be ready and attached
- Parameters: `connection_id` (string), `client_name` (string, optional),
`timeout_ms` (number, optional, default: 5000ms)
- Returns: Success confirmation with LSP client readiness status

### Complete LSP Code Action Workflow

The server now supports the full LSP code action lifecycle:
Expand Down
12 changes: 11 additions & 1 deletion docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Tools

The server provides 23 MCP tools for interacting with Neovim instances:
The server provides 24 MCP tools for interacting with Neovim instances:

#### Connection Management

Expand Down Expand Up @@ -48,6 +48,16 @@ All tools below require a `connection_id` parameter from connection establishmen
- **Returns**: Object with execution result
- **Usage**: Run Neovim commands, get editor state, or modify configuration

- **`wait_for_lsp_ready`**: Wait for LSP client to be ready and attached
- **Parameters**:
- `connection_id` (string): Target Neovim instance ID
- `client_name` (string, optional): Specific LSP client name to wait for
(waits for any if not specified)
- `timeout_ms` (number, optional): Timeout in milliseconds (default: 5000ms)
- **Returns**: Success confirmation with client readiness status
- **Usage**: Ensure LSP client is ready before performing LSP operations
for reliable results

- **`buffer_diagnostics`**: Get diagnostics for specific buffer
- **Parameters**:
- `connection_id` (string): Target Neovim instance ID
Expand Down
Loading