OmniSharp / OmniSharp/csharp-language-server-protocol
Enabling/disabling handler based on client configuration
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 638
- Forks
- 109
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Description
Is there a way to enable and disable handlers dynamically based on client configuration?
For example, VS Code recommends that a formatter provide a client setting to enable or disable it.
If this is possible to do, I'm guessing it's probably something like this:
- Enable synchronization of the relevant configuration section (.WithConfigurationSection, I think)
- Either pass configuration at startup (for clients that don't support dynamic configuration), or delay enabling the handler until after Initialize has completed and then retrieve configuration and add the handler if enabled. (Per the spec, the server isn't allowed to use the configuration request message before initialization has completed).
- Listen to configuration changes, and remove and add the handler as appropriate.
Questions:
Are there APIs to add or remove handlers after the server has completed initialization?
What's the best approach to listen for a change to a specific configuration setting?
Thanks,
David
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the handler-registration APIs and .WithConfigurationSection mentioned in the issue, then trace initialization and configuration-change handling in the repository. Determine whether handlers can be added or removed after initialization and how a specific setting can be observed; done means the supported approach and any required API changes are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100