Skip to content

Rework capability registration and handler setup #1327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Apr 19, 2025

This PR changes how capability registration works such that:

  • Dynamic registrations are honored on a per-capability basis rather than only when the client supports several capabilities being dynamically registered
  • Most capabilities are registered once after project discovery and only re-registered after a server restart
  • The completion capability will not re-register itself if trigger characters have not changed

This should, in most cases, mean that all supported capabilities are dynamically registered once at startup. Trigger characters only change for projects where the variant separator is customizable, has been customized, and includes a character that is not already considered a trigger character (v4 does not allow customizing the variant separator but v3 did)

Fixes #1319

  • Need to look into creating a reproduction w/ 500-ish v3 config files in it to see if I can repro the original issue. We call updateCapabilities after a build finishes and its likely that this is/was slow enough with IntelliSense trying to handle 500 separate v3 projects at once

- Dynamic registrations are honored on a per-capability basis rather than only when the client supports several capabilities being dynamically registered
- Most capabilities are registered _once_ after project discovery and only re-registered after a server restart
- The completion capability will not re-register itself if trigger characters have not changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite register of language feature
1 participant