Skip to content

Add custom schema support#47

Merged
ViTeXFTW merged 2 commits into
devfrom
feat-custom-schema
Jul 17, 2026
Merged

Add custom schema support#47
ViTeXFTW merged 2 commits into
devfrom
feat-custom-schema

Conversation

@ViTeXFTW

Copy link
Copy Markdown
Owner

What changed\n\n- load an optional custom schema before indexing\n- fall back to the embedded schema with a warning on read or JSON errors\n- add a VS Code setting and command-palette file picker\n- document configuration and add focused behavioral tests\n\n## Why\n\nMod authors can use their own schema without replacing the bundled server, while retaining safe built-in behavior when that schema is unavailable or invalid.\n\n## Validation\n\n- cargo test --workspace\n-

pm run compile in �ditors/vscode\n- stdio end-to-end suite

@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds optional custom schema support to the language server and VS Code extension. The main changes are:

  • Custom schema loading from schemaPath during LSP initialization.
  • Fallback to the embedded schema with a warning when the custom schema cannot be read or parsed.
  • VS Code setting and command-palette picker for zerosyntax.schema.path.
  • Documentation updates for the new schema option.
  • A fixture-backed server test covering custom-schema diagnostics and fallback behavior.

Confidence Score: 5/5

Safe to merge with low risk.

The change is scoped to initialization-time schema selection and preserves the embedded schema fallback on read or parse failures. Analyzer usage was updated consistently across diagnostics, completion, navigation, semantic tokens, hover, and code actions. No functional or security issues were identified in the changed files.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • The server test suite ran and all tests passed (25/25) with exit code 0.
  • End-to-end checks via STDIO tests completed with ALL E2E CHECKS PASSED and exit code 0.
  • The TypeScript compilation finished (VS Code tsc -p ./) with exit code 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
crates/server/src/backend.rs Adds custom schema loading during LSP initialization, fallback warning handling, analyzer indirection, and focused tests.
crates/server/tests/fixtures/custom-schema.json Adds a minimal custom schema fixture used to verify schema-driven diagnostics behavior.
docs/language-server.md Documents the new schemaPath initialization option and fallback behavior.
editors/vscode/README.md Adds the VS Code custom schema setting to the settings table.
editors/vscode/package.json Contributes the schema picker command and zerosyntax.schema.path configuration setting.
editors/vscode/src/extension.ts Passes the configured schema path to the server and registers a command-palette picker that updates workspace configuration.

Reviews (2): Last reviewed commit: "Merge branch 'dev' of https://github.com..." | Re-trigger Greptile

…eat-custom-schema

# Conflicts:
#	crates/server/src/backend.rs
@ViTeXFTW
ViTeXFTW marked this pull request as ready for review July 17, 2026 07:49
@ViTeXFTW
ViTeXFTW merged commit e84de1d into dev Jul 17, 2026
5 checks passed
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.

1 participant