JSON: LSP not refreshing completions when schemas are updated #34828
plugd-in
started this conversation in
Language Support
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.
Uh oh!
There was an error while loading. Please reload this page.
-
When using a relative path for a JSON schema (e.g.
./schema/main.schema.json), changes to the schema aren't reflected in the relevant JSON files that use the schema.Part of the json-language-server is that
$schemas that don't use a supported scheme ask the client to resolve the URI using avscode/contentrequest. Zed handles this here, but subsequent changes to the schema aren't reported to the LSP. My expectation is that if the schema is within the project, that Zed reports changes to the schema file via ajson/schemaContentnotification.From
json-language-serverdocs:A potential implementation is to register the files for watching when a
vscode/contentrequest is made and send ajson/schemaContentrequest when the file changes. Here's where the VS Code JSON extension handles such changes.Beta Was this translation helpful? Give feedback.
All reactions