Add comprehensive LSP resilience and health monitoring to prevent frequent client restarts#3
Merged
WillEhrendreich merged 3 commits intoAug 30, 2025
Conversation
Co-authored-by: WillEhrendreich <55286472+WillEhrendreich@users.noreply.github.com>
Co-authored-by: WillEhrendreich <55286472+WillEhrendreich@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add test coverage to ensure that this is working properly. I have to restart the client too often, so I need you to find the cause, create tests to verify there is resilient communication with fsautocomplete language server, and once the tests are in p...
Add comprehensive LSP resilience and health monitoring to prevent frequent client restarts
Aug 30, 2025
WillEhrendreich
previously requested changes
Aug 30, 2025
i guess I will just do a new task, not sure how to make this continue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses the frequent LSP client restart issues by implementing comprehensive resilience features and health monitoring for the FsAutoComplete language server communication.
Problem
Users were experiencing frequent LSP client disconnections requiring manual restarts, leading to disrupted F# development workflow. The existing implementation lacked:
Solution
🛡️ Enhanced LSP Resilience
🏥 Health Monitoring System
:IonideCheckLspHealth- Check current LSP status:IonideRestartLspClient- Manually restart clients🔧 Improved Error Handling
⚙️ Configuration
EnableHealthMonitoringsetting (default:true) to control health monitoringTechnical Details
The implementation centers around
CallWithResilience()which wraps all LSP calls with:Health monitoring runs in the background and automatically:
Testing
Comprehensive test suite with 46 tests covering:
All tests pass ✅ ensuring reliability and backward compatibility.
Benefits
This implementation transforms the Ionide-nvim experience from requiring frequent manual intervention to providing a robust, self-healing LSP client that maintains reliable F# development workflow.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.