Allow extensions to opt-out of initialization #25660
notchairmk
started this conversation in
Feature Ideas / Enhancements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
The
zed_extension_api
requires that extensions always return a command (specificallyResult<Command>
). There are some situations where an extension may be able to discern that it can't or shouldn't initialize, with raising an error being the only way to let the user know that something went wrong. This ends up being somewhat of a hassle to users, potentially requiring them to have custom configs for each workspace just to disable the extension. Ideally the extensions would be able to "just work" from a more global config.Relevant issue: notchairmk/zed-sorbet#2
Proposed Solution
Allow language_server_command to return a
Result<Option<Command>>
, conditionally trying to start the extension if it return a command.Beta Was this translation helpful? Give feedback.
All reactions