extension_api: Add language server schema methods#48334
extension_api: Add language server schema methods#48334MrSubidubi merged 8 commits intozed-industries:mainfrom
Conversation
8e1a843 to
193af58
Compare
This exposes the LSP settings schema functionality to extensions, allowing them to provide JSON Schema for `initialization_options` and `settings` fields to enable autocomplete in settings files. New extension API methods (v0.8.0+): - `language_server_initialization_options_schema` - `language_server_settings_schema` Both methods return an optional JSON string conforming to JSON Schema. Older extension versions gracefully return None. Release Notes: - Added extension API methods for providing JSON Schema for LSP `initialization_options` and `settings` fields (v0.8.0+) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
193af58 to
d6a58aa
Compare
|
Friendly ping. |
MrSubidubi
left a comment
There was a problem hiding this comment.
Another topic to discuss: I have been thinking about supporting an additional way to provide a schema, which would be via an URI. Strictly speaking, this might already be possible with the API at hand, but I am wondering as to whether we would want to make the option more explicit, as not many people might know about this.
I think the current API already reasonably covers this — since the return type is a JSON Schema value, extension authors are free to fetch a schema from any source (including a remote URL) and return it. So I don't see a need to provide a separate explicit option for this. If there turns out to be real user demand, we can always revisit later? |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Friendly ping. |
MrSubidubi
left a comment
There was a problem hiding this comment.
Added some changes and fixes on top of this myself. Thanks for the PR and getting the ball rolling on this!
|
Thanks for finishing up this PR. Could you tell me when you will publish a new extension API version? |
|
Sadly, we currently have no set date nor a specific timeframe for publishing the new version. Initially, the version was slated for the release of agent provider extensions, but we had to postpone this due to some other changes. This might be unblocked soon, and we'll probably have to wait for that to land. |
(This should be merged after #48332)
This PR exposes the LSP settings schema functionality to extensions, allowing them to provide JSON schema for
initialization_optionsandsettingsfields to enable autocomplete in settings files.New extension API methods (v0.8.0+):
language_server_initialization_options_schemalanguage_server_settings_schemaBoth methods return an optional JSON string conforming to JSON schema.
Older extension versions gracefully return
None.Release Notes: