@hydranium/core 1.0.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +100 -0
- package/lib/documents/ast-document-manager.d.ts +243 -0
- package/lib/documents/ast-document-manager.d.ts.map +1 -0
- package/lib/documents/ast-document-manager.js +302 -0
- package/lib/documents/ast-document-manager.js.map +1 -0
- package/lib/documents/client-ids.d.ts +30 -0
- package/lib/documents/client-ids.d.ts.map +1 -0
- package/lib/documents/client-ids.js +30 -0
- package/lib/documents/client-ids.js.map +1 -0
- package/lib/documents/hydranium-text-documents.d.ts +490 -0
- package/lib/documents/hydranium-text-documents.d.ts.map +1 -0
- package/lib/documents/hydranium-text-documents.js +893 -0
- package/lib/documents/hydranium-text-documents.js.map +1 -0
- package/lib/documents/index.d.ts +14 -0
- package/lib/documents/index.d.ts.map +1 -0
- package/lib/documents/index.js +14 -0
- package/lib/documents/index.js.map +1 -0
- package/lib/documents/language-client-text-shadow.d.ts +101 -0
- package/lib/documents/language-client-text-shadow.d.ts.map +1 -0
- package/lib/documents/language-client-text-shadow.js +156 -0
- package/lib/documents/language-client-text-shadow.js.map +1 -0
- package/lib/documents/self-save-registry.d.ts +55 -0
- package/lib/documents/self-save-registry.d.ts.map +1 -0
- package/lib/documents/self-save-registry.js +68 -0
- package/lib/documents/self-save-registry.js.map +1 -0
- package/lib/index.d.ts +38 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +39 -0
- package/lib/index.js.map +1 -0
- package/lib/langium/ast-extension/ast-extension-contribution.d.ts +33 -0
- package/lib/langium/ast-extension/ast-extension-contribution.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-extension-contribution.js +10 -0
- package/lib/langium/ast-extension/ast-extension-contribution.js.map +1 -0
- package/lib/langium/ast-extension/ast-extension-service.d.ts +212 -0
- package/lib/langium/ast-extension/ast-extension-service.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-extension-service.js +181 -0
- package/lib/langium/ast-extension/ast-extension-service.js.map +1 -0
- package/lib/langium/ast-extension/ast-node-builder.d.ts +90 -0
- package/lib/langium/ast-extension/ast-node-builder.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-node-builder.js +61 -0
- package/lib/langium/ast-extension/ast-node-builder.js.map +1 -0
- package/lib/langium/ast-extension/index.d.ts +12 -0
- package/lib/langium/ast-extension/index.d.ts.map +1 -0
- package/lib/langium/ast-extension/index.js +12 -0
- package/lib/langium/ast-extension/index.js.map +1 -0
- package/lib/langium/bootstrap.d.ts +224 -0
- package/lib/langium/bootstrap.d.ts.map +1 -0
- package/lib/langium/bootstrap.js +512 -0
- package/lib/langium/bootstrap.js.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts +77 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.js +102 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.js.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts +106 -0
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass.js +43 -0
- package/lib/langium/build-phase-pass/build-phase-pass.js.map +1 -0
- package/lib/langium/build-phase-pass/index.d.ts +11 -0
- package/lib/langium/build-phase-pass/index.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/index.js +11 -0
- package/lib/langium/build-phase-pass/index.js.map +1 -0
- package/lib/langium/config/index.d.ts +10 -0
- package/lib/langium/config/index.d.ts.map +1 -0
- package/lib/langium/config/index.js +10 -0
- package/lib/langium/config/index.js.map +1 -0
- package/lib/langium/config/settings.d.ts +173 -0
- package/lib/langium/config/settings.d.ts.map +1 -0
- package/lib/langium/config/settings.js +196 -0
- package/lib/langium/config/settings.js.map +1 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts +109 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts.map +1 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.js +153 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.js.map +1 -0
- package/lib/langium/diagnostics/index.d.ts +14 -0
- package/lib/langium/diagnostics/index.d.ts.map +1 -0
- package/lib/langium/diagnostics/index.js +19 -0
- package/lib/langium/diagnostics/index.js.map +1 -0
- package/lib/langium/diagnostics/log-file-token.d.ts +16 -0
- package/lib/langium/diagnostics/log-file-token.d.ts.map +1 -0
- package/lib/langium/diagnostics/log-file-token.js +25 -0
- package/lib/langium/diagnostics/log-file-token.js.map +1 -0
- package/lib/langium/diagnostics/log-preamble.d.ts +42 -0
- package/lib/langium/diagnostics/log-preamble.d.ts.map +1 -0
- package/lib/langium/diagnostics/log-preamble.js +57 -0
- package/lib/langium/diagnostics/log-preamble.js.map +1 -0
- package/lib/langium/diagnostics/logger.d.ts +104 -0
- package/lib/langium/diagnostics/logger.d.ts.map +1 -0
- package/lib/langium/diagnostics/logger.js +178 -0
- package/lib/langium/diagnostics/logger.js.map +1 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts +76 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts.map +1 -0
- package/lib/langium/diagnostics/lsp-logger.js +223 -0
- package/lib/langium/diagnostics/lsp-logger.js.map +1 -0
- package/lib/langium/diagnostics/server-tracer.d.ts +27 -0
- package/lib/langium/diagnostics/server-tracer.d.ts.map +1 -0
- package/lib/langium/diagnostics/server-tracer.js +66 -0
- package/lib/langium/diagnostics/server-tracer.js.map +1 -0
- package/lib/langium/document-builder/build-pipeline-integration.d.ts +88 -0
- package/lib/langium/document-builder/build-pipeline-integration.d.ts.map +1 -0
- package/lib/langium/document-builder/build-pipeline-integration.js +151 -0
- package/lib/langium/document-builder/build-pipeline-integration.js.map +1 -0
- package/lib/langium/document-builder/document-builder.d.ts +405 -0
- package/lib/langium/document-builder/document-builder.d.ts.map +1 -0
- package/lib/langium/document-builder/document-builder.js +729 -0
- package/lib/langium/document-builder/document-builder.js.map +1 -0
- package/lib/langium/document-builder/index.d.ts +12 -0
- package/lib/langium/document-builder/index.d.ts.map +1 -0
- package/lib/langium/document-builder/index.js +12 -0
- package/lib/langium/document-builder/index.js.map +1 -0
- package/lib/langium/document-builder/labeled-phase-listener.d.ts +21 -0
- package/lib/langium/document-builder/labeled-phase-listener.d.ts.map +1 -0
- package/lib/langium/document-builder/labeled-phase-listener.js +15 -0
- package/lib/langium/document-builder/labeled-phase-listener.js.map +1 -0
- package/lib/langium/documentation/comment-provider.d.ts +31 -0
- package/lib/langium/documentation/comment-provider.d.ts.map +1 -0
- package/lib/langium/documentation/comment-provider.js +36 -0
- package/lib/langium/documentation/comment-provider.js.map +1 -0
- package/lib/langium/documentation/index.d.ts +10 -0
- package/lib/langium/documentation/index.d.ts.map +1 -0
- package/lib/langium/documentation/index.js +10 -0
- package/lib/langium/documentation/index.js.map +1 -0
- package/lib/langium/integration-services.d.ts +200 -0
- package/lib/langium/integration-services.d.ts.map +1 -0
- package/lib/langium/integration-services.js +65 -0
- package/lib/langium/integration-services.js.map +1 -0
- package/lib/langium/integrity/index.d.ts +12 -0
- package/lib/langium/integrity/index.d.ts.map +1 -0
- package/lib/langium/integrity/index.js +12 -0
- package/lib/langium/integrity/index.js.map +1 -0
- package/lib/langium/integrity/integrity-contribution.d.ts +42 -0
- package/lib/langium/integrity/integrity-contribution.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-contribution.js +10 -0
- package/lib/langium/integrity/integrity-contribution.js.map +1 -0
- package/lib/langium/integrity/integrity-rule.d.ts +82 -0
- package/lib/langium/integrity/integrity-rule.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-rule.js +52 -0
- package/lib/langium/integrity/integrity-rule.js.map +1 -0
- package/lib/langium/integrity/integrity-service.d.ts +221 -0
- package/lib/langium/integrity/integrity-service.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-service.js +328 -0
- package/lib/langium/integrity/integrity-service.js.map +1 -0
- package/lib/langium/keys/default-element-key-provider.d.ts +19 -0
- package/lib/langium/keys/default-element-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/default-element-key-provider.js +18 -0
- package/lib/langium/keys/default-element-key-provider.js.map +1 -0
- package/lib/langium/keys/element-key-provider.d.ts +106 -0
- package/lib/langium/keys/element-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/element-key-provider.js +25 -0
- package/lib/langium/keys/element-key-provider.js.map +1 -0
- package/lib/langium/keys/index.d.ts +13 -0
- package/lib/langium/keys/index.d.ts.map +1 -0
- package/lib/langium/keys/index.js +13 -0
- package/lib/langium/keys/index.js.map +1 -0
- package/lib/langium/keys/name-based-key-provider.d.ts +99 -0
- package/lib/langium/keys/name-based-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/name-based-key-provider.js +134 -0
- package/lib/langium/keys/name-based-key-provider.js.map +1 -0
- package/lib/langium/keys/positional-key-provider.d.ts +41 -0
- package/lib/langium/keys/positional-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/positional-key-provider.js +48 -0
- package/lib/langium/keys/positional-key-provider.js.map +1 -0
- package/lib/langium/labeling/index.d.ts +10 -0
- package/lib/langium/labeling/index.d.ts.map +1 -0
- package/lib/langium/labeling/index.js +10 -0
- package/lib/langium/labeling/index.js.map +1 -0
- package/lib/langium/labeling/label-provider.d.ts +79 -0
- package/lib/langium/labeling/label-provider.d.ts.map +1 -0
- package/lib/langium/labeling/label-provider.js +44 -0
- package/lib/langium/labeling/label-provider.js.map +1 -0
- package/lib/langium/language-module.d.ts +281 -0
- package/lib/langium/language-module.d.ts.map +1 -0
- package/lib/langium/language-module.js +103 -0
- package/lib/langium/language-module.js.map +1 -0
- package/lib/langium/language-types.d.ts +85 -0
- package/lib/langium/language-types.d.ts.map +1 -0
- package/lib/langium/language-types.js +173 -0
- package/lib/langium/language-types.js.map +1 -0
- package/lib/langium/model-service/index.d.ts +10 -0
- package/lib/langium/model-service/index.d.ts.map +1 -0
- package/lib/langium/model-service/index.js +10 -0
- package/lib/langium/model-service/index.js.map +1 -0
- package/lib/langium/model-service/model-service.d.ts +598 -0
- package/lib/langium/model-service/model-service.d.ts.map +1 -0
- package/lib/langium/model-service/model-service.js +889 -0
- package/lib/langium/model-service/model-service.js.map +1 -0
- package/lib/langium/module.d.ts +308 -0
- package/lib/langium/module.d.ts.map +1 -0
- package/lib/langium/module.js +165 -0
- package/lib/langium/module.js.map +1 -0
- package/lib/langium/naming/index.d.ts +11 -0
- package/lib/langium/naming/index.d.ts.map +1 -0
- package/lib/langium/naming/index.js +11 -0
- package/lib/langium/naming/index.js.map +1 -0
- package/lib/langium/naming/name-provider.d.ts +360 -0
- package/lib/langium/naming/name-provider.d.ts.map +1 -0
- package/lib/langium/naming/name-provider.js +240 -0
- package/lib/langium/naming/name-provider.js.map +1 -0
- package/lib/langium/naming/name-separator-validation.d.ts +47 -0
- package/lib/langium/naming/name-separator-validation.d.ts.map +1 -0
- package/lib/langium/naming/name-separator-validation.js +61 -0
- package/lib/langium/naming/name-separator-validation.js.map +1 -0
- package/lib/langium/project/abstract-project-manager.d.ts +242 -0
- package/lib/langium/project/abstract-project-manager.d.ts.map +1 -0
- package/lib/langium/project/abstract-project-manager.js +545 -0
- package/lib/langium/project/abstract-project-manager.js.map +1 -0
- package/lib/langium/project/index.d.ts +13 -0
- package/lib/langium/project/index.d.ts.map +1 -0
- package/lib/langium/project/index.js +13 -0
- package/lib/langium/project/index.js.map +1 -0
- package/lib/langium/project/project-change-event.d.ts +64 -0
- package/lib/langium/project/project-change-event.d.ts.map +1 -0
- package/lib/langium/project/project-change-event.js +10 -0
- package/lib/langium/project/project-change-event.js.map +1 -0
- package/lib/langium/project/project-manager.d.ts +196 -0
- package/lib/langium/project/project-manager.d.ts.map +1 -0
- package/lib/langium/project/project-manager.js +10 -0
- package/lib/langium/project/project-manager.js.map +1 -0
- package/lib/langium/project/single-project-manager.d.ts +69 -0
- package/lib/langium/project/single-project-manager.d.ts.map +1 -0
- package/lib/langium/project/single-project-manager.js +104 -0
- package/lib/langium/project/single-project-manager.js.map +1 -0
- package/lib/langium/residency/cst-residency-service.d.ts +214 -0
- package/lib/langium/residency/cst-residency-service.d.ts.map +1 -0
- package/lib/langium/residency/cst-residency-service.js +349 -0
- package/lib/langium/residency/cst-residency-service.js.map +1 -0
- package/lib/langium/residency/index.d.ts +10 -0
- package/lib/langium/residency/index.d.ts.map +1 -0
- package/lib/langium/residency/index.js +10 -0
- package/lib/langium/residency/index.js.map +1 -0
- package/lib/langium/scope/ast-node-description-provider.d.ts +122 -0
- package/lib/langium/scope/ast-node-description-provider.d.ts.map +1 -0
- package/lib/langium/scope/ast-node-description-provider.js +115 -0
- package/lib/langium/scope/ast-node-description-provider.js.map +1 -0
- package/lib/langium/scope/hydranium-scope-computation.d.ts +163 -0
- package/lib/langium/scope/hydranium-scope-computation.d.ts.map +1 -0
- package/lib/langium/scope/hydranium-scope-computation.js +220 -0
- package/lib/langium/scope/hydranium-scope-computation.js.map +1 -0
- package/lib/langium/scope/hydranium-scope-provider.d.ts +411 -0
- package/lib/langium/scope/hydranium-scope-provider.d.ts.map +1 -0
- package/lib/langium/scope/hydranium-scope-provider.js +543 -0
- package/lib/langium/scope/hydranium-scope-provider.js.map +1 -0
- package/lib/langium/scope/index.d.ts +18 -0
- package/lib/langium/scope/index.d.ts.map +1 -0
- package/lib/langium/scope/index.js +18 -0
- package/lib/langium/scope/index.js.map +1 -0
- package/lib/langium/scope/reference-builder.d.ts +125 -0
- package/lib/langium/scope/reference-builder.d.ts.map +1 -0
- package/lib/langium/scope/reference-builder.js +115 -0
- package/lib/langium/scope/reference-builder.js.map +1 -0
- package/lib/langium/scope/reference-candidate-provider.d.ts +228 -0
- package/lib/langium/scope/reference-candidate-provider.d.ts.map +1 -0
- package/lib/langium/scope/reference-candidate-provider.js +185 -0
- package/lib/langium/scope/reference-candidate-provider.js.map +1 -0
- package/lib/langium/scope/scope-extension-contribution.d.ts +32 -0
- package/lib/langium/scope/scope-extension-contribution.d.ts.map +1 -0
- package/lib/langium/scope/scope-extension-contribution.js +10 -0
- package/lib/langium/scope/scope-extension-contribution.js.map +1 -0
- package/lib/langium/scope/scope-extension-service.d.ts +149 -0
- package/lib/langium/scope/scope-extension-service.d.ts.map +1 -0
- package/lib/langium/scope/scope-extension-service.js +94 -0
- package/lib/langium/scope/scope-extension-service.js.map +1 -0
- package/lib/langium/scope/scoped-ast-node-description.d.ts +160 -0
- package/lib/langium/scope/scoped-ast-node-description.d.ts.map +1 -0
- package/lib/langium/scope/scoped-ast-node-description.js +98 -0
- package/lib/langium/scope/scoped-ast-node-description.js.map +1 -0
- package/lib/langium/scope/tier-specificity.d.ts +47 -0
- package/lib/langium/scope/tier-specificity.d.ts.map +1 -0
- package/lib/langium/scope/tier-specificity.js +83 -0
- package/lib/langium/scope/tier-specificity.js.map +1 -0
- package/lib/langium/serialization/abstract-serializer.d.ts +316 -0
- package/lib/langium/serialization/abstract-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/abstract-serializer.js +351 -0
- package/lib/langium/serialization/abstract-serializer.js.map +1 -0
- package/lib/langium/serialization/index.d.ts +14 -0
- package/lib/langium/serialization/index.d.ts.map +1 -0
- package/lib/langium/serialization/index.js +14 -0
- package/lib/langium/serialization/index.js.map +1 -0
- package/lib/langium/serialization/json-serializer.d.ts +106 -0
- package/lib/langium/serialization/json-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/json-serializer.js +198 -0
- package/lib/langium/serialization/json-serializer.js.map +1 -0
- package/lib/langium/serialization/serialization-util.d.ts +29 -0
- package/lib/langium/serialization/serialization-util.d.ts.map +1 -0
- package/lib/langium/serialization/serialization-util.js +37 -0
- package/lib/langium/serialization/serialization-util.js.map +1 -0
- package/lib/langium/serialization/serializer.d.ts +66 -0
- package/lib/langium/serialization/serializer.d.ts.map +1 -0
- package/lib/langium/serialization/serializer.js +10 -0
- package/lib/langium/serialization/serializer.js.map +1 -0
- package/lib/langium/serialization/yaml-serializer.d.ts +166 -0
- package/lib/langium/serialization/yaml-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/yaml-serializer.js +228 -0
- package/lib/langium/serialization/yaml-serializer.js.map +1 -0
- package/lib/langium/service-registry.d.ts +220 -0
- package/lib/langium/service-registry.d.ts.map +1 -0
- package/lib/langium/service-registry.js +258 -0
- package/lib/langium/service-registry.js.map +1 -0
- package/lib/langium/shared-services.d.ts +98 -0
- package/lib/langium/shared-services.d.ts.map +1 -0
- package/lib/langium/shared-services.js +30 -0
- package/lib/langium/shared-services.js.map +1 -0
- package/lib/langium/transfer/index.d.ts +10 -0
- package/lib/langium/transfer/index.d.ts.map +1 -0
- package/lib/langium/transfer/index.js +10 -0
- package/lib/langium/transfer/index.js.map +1 -0
- package/lib/langium/transfer/transfer-encoder.d.ts +294 -0
- package/lib/langium/transfer/transfer-encoder.d.ts.map +1 -0
- package/lib/langium/transfer/transfer-encoder.js +328 -0
- package/lib/langium/transfer/transfer-encoder.js.map +1 -0
- package/lib/langium/update-rewrite/index.d.ts +14 -0
- package/lib/langium/update-rewrite/index.d.ts.map +1 -0
- package/lib/langium/update-rewrite/index.js +14 -0
- package/lib/langium/update-rewrite/index.js.map +1 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.d.ts +52 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.d.ts.map +1 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.js +83 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.js.map +1 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts +37 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts.map +1 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.js +51 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts +42 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.js +10 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-service.d.ts +89 -0
- package/lib/langium/update-rewrite/update-rewrite-service.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-service.js +75 -0
- package/lib/langium/update-rewrite/update-rewrite-service.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite.d.ts +59 -0
- package/lib/langium/update-rewrite/update-rewrite.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite.js +10 -0
- package/lib/langium/update-rewrite/update-rewrite.js.map +1 -0
- package/lib/langium/validation/document-validator.d.ts +106 -0
- package/lib/langium/validation/document-validator.d.ts.map +1 -0
- package/lib/langium/validation/document-validator.js +118 -0
- package/lib/langium/validation/document-validator.js.map +1 -0
- package/lib/langium/validation/index.d.ts +12 -0
- package/lib/langium/validation/index.d.ts.map +1 -0
- package/lib/langium/validation/index.js +12 -0
- package/lib/langium/validation/index.js.map +1 -0
- package/lib/langium/validation/validation-contribution-collector.d.ts +34 -0
- package/lib/langium/validation/validation-contribution-collector.d.ts.map +1 -0
- package/lib/langium/validation/validation-contribution-collector.js +51 -0
- package/lib/langium/validation/validation-contribution-collector.js.map +1 -0
- package/lib/langium/validation/validation-contribution.d.ts +36 -0
- package/lib/langium/validation/validation-contribution.d.ts.map +1 -0
- package/lib/langium/validation/validation-contribution.js +10 -0
- package/lib/langium/validation/validation-contribution.js.map +1 -0
- package/lib/langium/workspace/additional-document-contribution.d.ts +68 -0
- package/lib/langium/workspace/additional-document-contribution.d.ts.map +1 -0
- package/lib/langium/workspace/additional-document-contribution.js +23 -0
- package/lib/langium/workspace/additional-document-contribution.js.map +1 -0
- package/lib/langium/workspace/document-uri-policy.d.ts +151 -0
- package/lib/langium/workspace/document-uri-policy.d.ts.map +1 -0
- package/lib/langium/workspace/document-uri-policy.js +121 -0
- package/lib/langium/workspace/document-uri-policy.js.map +1 -0
- package/lib/langium/workspace/file-system-provider.d.ts +30 -0
- package/lib/langium/workspace/file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/file-system-provider.js +41 -0
- package/lib/langium/workspace/file-system-provider.js.map +1 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts +45 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.js +64 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.js.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-lock.d.ts +31 -0
- package/lib/langium/workspace/hydranium-workspace-lock.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-lock.js +33 -0
- package/lib/langium/workspace/hydranium-workspace-lock.js.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts +232 -0
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js +368 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js.map +1 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts +127 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/in-memory-file-system-provider.js +195 -0
- package/lib/langium/workspace/in-memory-file-system-provider.js.map +1 -0
- package/lib/langium/workspace/index-manager.d.ts +142 -0
- package/lib/langium/workspace/index-manager.d.ts.map +1 -0
- package/lib/langium/workspace/index-manager.js +245 -0
- package/lib/langium/workspace/index-manager.js.map +1 -0
- package/lib/langium/workspace/index.d.ts +23 -0
- package/lib/langium/workspace/index.d.ts.map +1 -0
- package/lib/langium/workspace/index.js +23 -0
- package/lib/langium/workspace/index.js.map +1 -0
- package/lib/langium/workspace/initialize-workspace.d.ts +63 -0
- package/lib/langium/workspace/initialize-workspace.d.ts.map +1 -0
- package/lib/langium/workspace/initialize-workspace.js +88 -0
- package/lib/langium/workspace/initialize-workspace.js.map +1 -0
- package/lib/langium/workspace/langium-documents.d.ts +47 -0
- package/lib/langium/workspace/langium-documents.d.ts.map +1 -0
- package/lib/langium/workspace/langium-documents.js +85 -0
- package/lib/langium/workspace/langium-documents.js.map +1 -0
- package/lib/langium/workspace/persistent-file-system-provider.d.ts +207 -0
- package/lib/langium/workspace/persistent-file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/persistent-file-system-provider.js +208 -0
- package/lib/langium/workspace/persistent-file-system-provider.js.map +1 -0
- package/lib/langium/workspace/synthetic.d.ts +38 -0
- package/lib/langium/workspace/synthetic.d.ts.map +1 -0
- package/lib/langium/workspace/synthetic.js +58 -0
- package/lib/langium/workspace/synthetic.js.map +1 -0
- package/lib/langium/workspace/virtual-document.d.ts +78 -0
- package/lib/langium/workspace/virtual-document.d.ts.map +1 -0
- package/lib/langium/workspace/virtual-document.js +89 -0
- package/lib/langium/workspace/virtual-document.js.map +1 -0
- package/lib/langium/workspace/write-lock-scope.d.ts +69 -0
- package/lib/langium/workspace/write-lock-scope.d.ts.map +1 -0
- package/lib/langium/workspace/write-lock-scope.js +54 -0
- package/lib/langium/workspace/write-lock-scope.js.map +1 -0
- package/lib/launcher/index.d.ts +10 -0
- package/lib/launcher/index.d.ts.map +1 -0
- package/lib/launcher/index.js +12 -0
- package/lib/launcher/index.js.map +1 -0
- package/lib/launcher/integrated-server.d.ts +28 -0
- package/lib/launcher/integrated-server.d.ts.map +1 -0
- package/lib/launcher/integrated-server.js +10 -0
- package/lib/launcher/integrated-server.js.map +1 -0
- package/lib/lsp/completion/hydranium-completion-provider.d.ts +89 -0
- package/lib/lsp/completion/hydranium-completion-provider.d.ts.map +1 -0
- package/lib/lsp/completion/hydranium-completion-provider.js +123 -0
- package/lib/lsp/completion/hydranium-completion-provider.js.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.d.ts +204 -0
- package/lib/lsp/hydranium-document-update-handler.d.ts.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.js +288 -0
- package/lib/lsp/hydranium-document-update-handler.js.map +1 -0
- package/lib/lsp/index.d.ts +23 -0
- package/lib/lsp/index.d.ts.map +1 -0
- package/lib/lsp/index.js +23 -0
- package/lib/lsp/index.js.map +1 -0
- package/lib/lsp/instrument-connection.d.ts +36 -0
- package/lib/lsp/instrument-connection.d.ts.map +1 -0
- package/lib/lsp/instrument-connection.js +62 -0
- package/lib/lsp/instrument-connection.js.map +1 -0
- package/lib/lsp/language-module.d.ts +53 -0
- package/lib/lsp/language-module.d.ts.map +1 -0
- package/lib/lsp/language-module.js +28 -0
- package/lib/lsp/language-module.js.map +1 -0
- package/lib/lsp/semantic-token-provider.d.ts +131 -0
- package/lib/lsp/semantic-token-provider.d.ts.map +1 -0
- package/lib/lsp/semantic-token-provider.js +148 -0
- package/lib/lsp/semantic-token-provider.js.map +1 -0
- package/lib/lsp/shared-module.d.ts +76 -0
- package/lib/lsp/shared-module.d.ts.map +1 -0
- package/lib/lsp/shared-module.js +33 -0
- package/lib/lsp/shared-module.js.map +1 -0
- package/lib/lsp/start-language-server.d.ts +43 -0
- package/lib/lsp/start-language-server.d.ts.map +1 -0
- package/lib/lsp/start-language-server.js +60 -0
- package/lib/lsp/start-language-server.js.map +1 -0
- package/lib/node/ast-ground-truth.d.ts +57 -0
- package/lib/node/ast-ground-truth.d.ts.map +1 -0
- package/lib/node/ast-ground-truth.js +46 -0
- package/lib/node/ast-ground-truth.js.map +1 -0
- package/lib/node/event-loop-monitor.d.ts +40 -0
- package/lib/node/event-loop-monitor.d.ts.map +1 -0
- package/lib/node/event-loop-monitor.js +62 -0
- package/lib/node/event-loop-monitor.js.map +1 -0
- package/lib/node/index.d.ts +29 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +50 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/latency-from-env.d.ts +32 -0
- package/lib/node/latency-from-env.d.ts.map +1 -0
- package/lib/node/latency-from-env.js +36 -0
- package/lib/node/latency-from-env.js.map +1 -0
- package/lib/node/lint-grammar.d.ts +87 -0
- package/lib/node/lint-grammar.d.ts.map +1 -0
- package/lib/node/lint-grammar.js +124 -0
- package/lib/node/lint-grammar.js.map +1 -0
- package/lib/node/log-file-sink.d.ts +22 -0
- package/lib/node/log-file-sink.d.ts.map +1 -0
- package/lib/node/log-file-sink.js +43 -0
- package/lib/node/log-file-sink.js.map +1 -0
- package/lib/node/log-preamble-node.d.ts +28 -0
- package/lib/node/log-preamble-node.d.ts.map +1 -0
- package/lib/node/log-preamble-node.js +55 -0
- package/lib/node/log-preamble-node.js.map +1 -0
- package/lib/node/measure-memory.d.ts +86 -0
- package/lib/node/measure-memory.d.ts.map +1 -0
- package/lib/node/measure-memory.js +128 -0
- package/lib/node/measure-memory.js.map +1 -0
- package/lib/node/memory-monitor.d.ts +42 -0
- package/lib/node/memory-monitor.d.ts.map +1 -0
- package/lib/node/memory-monitor.js +83 -0
- package/lib/node/memory-monitor.js.map +1 -0
- package/lib/node/node-file-system-provider.d.ts +112 -0
- package/lib/node/node-file-system-provider.d.ts.map +1 -0
- package/lib/node/node-file-system-provider.js +230 -0
- package/lib/node/node-file-system-provider.js.map +1 -0
- package/lib/node/process-memory.d.ts +66 -0
- package/lib/node/process-memory.d.ts.map +1 -0
- package/lib/node/process-memory.js +252 -0
- package/lib/node/process-memory.js.map +1 -0
- package/lib/node/profile-capture.d.ts +118 -0
- package/lib/node/profile-capture.d.ts.map +1 -0
- package/lib/node/profile-capture.js +315 -0
- package/lib/node/profile-capture.js.map +1 -0
- package/lib/node/profile-digest.d.ts +49 -0
- package/lib/node/profile-digest.d.ts.map +1 -0
- package/lib/node/profile-digest.js +74 -0
- package/lib/node/profile-digest.js.map +1 -0
- package/lib/node/profiling-run.d.ts +80 -0
- package/lib/node/profiling-run.d.ts.map +1 -0
- package/lib/node/profiling-run.js +183 -0
- package/lib/node/profiling-run.js.map +1 -0
- package/lib/node/reflect-grammar.d.ts +109 -0
- package/lib/node/reflect-grammar.d.ts.map +1 -0
- package/lib/node/reflect-grammar.js +96 -0
- package/lib/node/reflect-grammar.js.map +1 -0
- package/lib/node/server-diagnostics.d.ts +43 -0
- package/lib/node/server-diagnostics.d.ts.map +1 -0
- package/lib/node/server-diagnostics.js +46 -0
- package/lib/node/server-diagnostics.js.map +1 -0
- package/lib/node/server-state-snapshot.d.ts +48 -0
- package/lib/node/server-state-snapshot.d.ts.map +1 -0
- package/lib/node/server-state-snapshot.js +139 -0
- package/lib/node/server-state-snapshot.js.map +1 -0
- package/lib/node/socket-launcher.d.ts +106 -0
- package/lib/node/socket-launcher.d.ts.map +1 -0
- package/lib/node/socket-launcher.js +138 -0
- package/lib/node/socket-launcher.js.map +1 -0
- package/lib/node/stdio-launcher.d.ts +88 -0
- package/lib/node/stdio-launcher.d.ts.map +1 -0
- package/lib/node/stdio-launcher.js +83 -0
- package/lib/node/stdio-launcher.js.map +1 -0
- package/lib/node/validate-workspace.d.ts +80 -0
- package/lib/node/validate-workspace.d.ts.map +1 -0
- package/lib/node/validate-workspace.js +72 -0
- package/lib/node/validate-workspace.js.map +1 -0
- package/lib/node/write-lock-scope-node.d.ts +27 -0
- package/lib/node/write-lock-scope-node.d.ts.map +1 -0
- package/lib/node/write-lock-scope-node.js +38 -0
- package/lib/node/write-lock-scope-node.js.map +1 -0
- package/lib/testing/ast-snapshot.d.ts +38 -0
- package/lib/testing/ast-snapshot.d.ts.map +1 -0
- package/lib/testing/ast-snapshot.js +78 -0
- package/lib/testing/ast-snapshot.js.map +1 -0
- package/lib/testing/document-uri-policy-conformance.d.ts +65 -0
- package/lib/testing/document-uri-policy-conformance.d.ts.map +1 -0
- package/lib/testing/document-uri-policy-conformance.js +69 -0
- package/lib/testing/document-uri-policy-conformance.js.map +1 -0
- package/lib/testing/fake-description.d.ts +35 -0
- package/lib/testing/fake-description.d.ts.map +1 -0
- package/lib/testing/fake-description.js +38 -0
- package/lib/testing/fake-description.js.map +1 -0
- package/lib/testing/fake-document.d.ts +71 -0
- package/lib/testing/fake-document.d.ts.map +1 -0
- package/lib/testing/fake-document.js +85 -0
- package/lib/testing/fake-document.js.map +1 -0
- package/lib/testing/fake-reflection.d.ts +29 -0
- package/lib/testing/fake-reflection.d.ts.map +1 -0
- package/lib/testing/fake-reflection.js +30 -0
- package/lib/testing/fake-reflection.js.map +1 -0
- package/lib/testing/index.d.ts +44 -0
- package/lib/testing/index.d.ts.map +1 -0
- package/lib/testing/index.js +44 -0
- package/lib/testing/index.js.map +1 -0
- package/lib/testing/langium-test-helpers.d.ts +26 -0
- package/lib/testing/langium-test-helpers.d.ts.map +1 -0
- package/lib/testing/langium-test-helpers.js +26 -0
- package/lib/testing/langium-test-helpers.js.map +1 -0
- package/lib/testing/make-noop-language-services.d.ts +39 -0
- package/lib/testing/make-noop-language-services.d.ts.map +1 -0
- package/lib/testing/make-noop-language-services.js +30 -0
- package/lib/testing/make-noop-language-services.js.map +1 -0
- package/lib/testing/make-noop-shared-services.d.ts +61 -0
- package/lib/testing/make-noop-shared-services.d.ts.map +1 -0
- package/lib/testing/make-noop-shared-services.js +49 -0
- package/lib/testing/make-noop-shared-services.js.map +1 -0
- package/lib/testing/make-test-services.d.ts +217 -0
- package/lib/testing/make-test-services.d.ts.map +1 -0
- package/lib/testing/make-test-services.js +128 -0
- package/lib/testing/make-test-services.js.map +1 -0
- package/lib/testing/make-test-tracer.d.ts +67 -0
- package/lib/testing/make-test-tracer.d.ts.map +1 -0
- package/lib/testing/make-test-tracer.js +68 -0
- package/lib/testing/make-test-tracer.js.map +1 -0
- package/lib/testing/node/generated-workspace.d.ts +95 -0
- package/lib/testing/node/generated-workspace.d.ts.map +1 -0
- package/lib/testing/node/generated-workspace.js +134 -0
- package/lib/testing/node/generated-workspace.js.map +1 -0
- package/lib/testing/node/golden-corpus.d.ts +50 -0
- package/lib/testing/node/golden-corpus.d.ts.map +1 -0
- package/lib/testing/node/golden-corpus.js +80 -0
- package/lib/testing/node/golden-corpus.js.map +1 -0
- package/lib/testing/node/index.d.ts +28 -0
- package/lib/testing/node/index.d.ts.map +1 -0
- package/lib/testing/node/index.js +28 -0
- package/lib/testing/node/index.js.map +1 -0
- package/lib/testing/node/lsp-harness.d.ts +139 -0
- package/lib/testing/node/lsp-harness.d.ts.map +1 -0
- package/lib/testing/node/lsp-harness.js +119 -0
- package/lib/testing/node/lsp-harness.js.map +1 -0
- package/lib/testing/node/lsp-server-connection.d.ts +232 -0
- package/lib/testing/node/lsp-server-connection.d.ts.map +1 -0
- package/lib/testing/node/lsp-server-connection.js +304 -0
- package/lib/testing/node/lsp-server-connection.js.map +1 -0
- package/lib/testing/node/scratch-workspace.d.ts +60 -0
- package/lib/testing/node/scratch-workspace.d.ts.map +1 -0
- package/lib/testing/node/scratch-workspace.js +87 -0
- package/lib/testing/node/scratch-workspace.js.map +1 -0
- package/lib/testing/node/spawned-server.d.ts +170 -0
- package/lib/testing/node/spawned-server.d.ts.map +1 -0
- package/lib/testing/node/spawned-server.js +265 -0
- package/lib/testing/node/spawned-server.js.map +1 -0
- package/lib/testing/parse-semantic-root.d.ts +83 -0
- package/lib/testing/parse-semantic-root.d.ts.map +1 -0
- package/lib/testing/parse-semantic-root.js +119 -0
- package/lib/testing/parse-semantic-root.js.map +1 -0
- package/lib/testing/playwright/browser-capture-bridge.d.ts +80 -0
- package/lib/testing/playwright/browser-capture-bridge.d.ts.map +1 -0
- package/lib/testing/playwright/browser-capture-bridge.js +161 -0
- package/lib/testing/playwright/browser-capture-bridge.js.map +1 -0
- package/lib/testing/playwright/e2e-profiling.d.ts +132 -0
- package/lib/testing/playwright/e2e-profiling.d.ts.map +1 -0
- package/lib/testing/playwright/e2e-profiling.js +270 -0
- package/lib/testing/playwright/e2e-profiling.js.map +1 -0
- package/lib/testing/playwright/index.d.ts +13 -0
- package/lib/testing/playwright/index.d.ts.map +1 -0
- package/lib/testing/playwright/index.js +16 -0
- package/lib/testing/playwright/index.js.map +1 -0
- package/lib/testing/playwright/server-log-capture.d.ts +230 -0
- package/lib/testing/playwright/server-log-capture.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-capture.js +336 -0
- package/lib/testing/playwright/server-log-capture.js.map +1 -0
- package/lib/testing/playwright/server-log-fixture.d.ts +36 -0
- package/lib/testing/playwright/server-log-fixture.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-fixture.js +38 -0
- package/lib/testing/playwright/server-log-fixture.js.map +1 -0
- package/lib/testing/playwright/server-log-rename-reporter.d.ts +22 -0
- package/lib/testing/playwright/server-log-rename-reporter.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-rename-reporter.js +26 -0
- package/lib/testing/playwright/server-log-rename-reporter.js.map +1 -0
- package/lib/testing/run-update-pipeline.d.ts +99 -0
- package/lib/testing/run-update-pipeline.d.ts.map +1 -0
- package/lib/testing/run-update-pipeline.js +24 -0
- package/lib/testing/run-update-pipeline.js.map +1 -0
- package/lib/testing/stub-ast-document-manager.d.ts +82 -0
- package/lib/testing/stub-ast-document-manager.d.ts.map +1 -0
- package/lib/testing/stub-ast-document-manager.js +125 -0
- package/lib/testing/stub-ast-document-manager.js.map +1 -0
- package/lib/testing/stub-document-builder.d.ts +99 -0
- package/lib/testing/stub-document-builder.d.ts.map +1 -0
- package/lib/testing/stub-document-builder.js +142 -0
- package/lib/testing/stub-document-builder.js.map +1 -0
- package/lib/testing/stub-hydranium-text-documents.d.ts +125 -0
- package/lib/testing/stub-hydranium-text-documents.d.ts.map +1 -0
- package/lib/testing/stub-hydranium-text-documents.js +164 -0
- package/lib/testing/stub-hydranium-text-documents.js.map +1 -0
- package/lib/testing/stub-index-manager.d.ts +40 -0
- package/lib/testing/stub-index-manager.d.ts.map +1 -0
- package/lib/testing/stub-index-manager.js +38 -0
- package/lib/testing/stub-index-manager.js.map +1 -0
- package/lib/testing/stub-langium-documents.d.ts +53 -0
- package/lib/testing/stub-langium-documents.d.ts.map +1 -0
- package/lib/testing/stub-langium-documents.js +62 -0
- package/lib/testing/stub-langium-documents.js.map +1 -0
- package/lib/testing/stub-model-service.d.ts +31 -0
- package/lib/testing/stub-model-service.d.ts.map +1 -0
- package/lib/testing/stub-model-service.js +45 -0
- package/lib/testing/stub-model-service.js.map +1 -0
- package/lib/testing/stub-project-manager.d.ts +43 -0
- package/lib/testing/stub-project-manager.d.ts.map +1 -0
- package/lib/testing/stub-project-manager.js +125 -0
- package/lib/testing/stub-project-manager.js.map +1 -0
- package/lib/testing/stub-self-save-registry.d.ts +31 -0
- package/lib/testing/stub-self-save-registry.d.ts.map +1 -0
- package/lib/testing/stub-self-save-registry.js +23 -0
- package/lib/testing/stub-self-save-registry.js.map +1 -0
- package/lib/testing/stub-service-registry.d.ts +95 -0
- package/lib/testing/stub-service-registry.d.ts.map +1 -0
- package/lib/testing/stub-service-registry.js +108 -0
- package/lib/testing/stub-service-registry.js.map +1 -0
- package/lib/testing/stub-writable-file-system.d.ts +42 -0
- package/lib/testing/stub-writable-file-system.d.ts.map +1 -0
- package/lib/testing/stub-writable-file-system.js +26 -0
- package/lib/testing/stub-writable-file-system.js.map +1 -0
- package/lib/util/connection-liveness.d.ts +25 -0
- package/lib/util/connection-liveness.d.ts.map +1 -0
- package/lib/util/connection-liveness.js +46 -0
- package/lib/util/connection-liveness.js.map +1 -0
- package/lib/util/environment.d.ts +53 -0
- package/lib/util/environment.d.ts.map +1 -0
- package/lib/util/environment.js +78 -0
- package/lib/util/environment.js.map +1 -0
- package/lib/util/index.d.ts +13 -0
- package/lib/util/index.d.ts.map +1 -0
- package/lib/util/index.js +18 -0
- package/lib/util/index.js.map +1 -0
- package/lib/util/registry.d.ts +88 -0
- package/lib/util/registry.d.ts.map +1 -0
- package/lib/util/registry.js +105 -0
- package/lib/util/registry.js.map +1 -0
- package/package.json +134 -0
- package/src/documents/ast-document-manager.ts +455 -0
- package/src/documents/client-ids.ts +33 -0
- package/src/documents/hydranium-text-documents.ts +1142 -0
- package/src/documents/index.ts +14 -0
- package/src/documents/language-client-text-shadow.ts +175 -0
- package/src/documents/self-save-registry.ts +81 -0
- package/src/index.ts +39 -0
- package/src/langium/ast-extension/ast-extension-contribution.ts +35 -0
- package/src/langium/ast-extension/ast-extension-service.ts +311 -0
- package/src/langium/ast-extension/ast-node-builder.ts +125 -0
- package/src/langium/ast-extension/index.ts +12 -0
- package/src/langium/bootstrap.ts +600 -0
- package/src/langium/build-phase-pass/build-phase-pass-service.ts +141 -0
- package/src/langium/build-phase-pass/build-phase-pass.ts +123 -0
- package/src/langium/build-phase-pass/index.ts +11 -0
- package/src/langium/config/index.ts +10 -0
- package/src/langium/config/settings.ts +353 -0
- package/src/langium/diagnostics/hydranium-langium-profiler.ts +187 -0
- package/src/langium/diagnostics/index.ts +19 -0
- package/src/langium/diagnostics/log-file-token.ts +26 -0
- package/src/langium/diagnostics/log-preamble.ts +87 -0
- package/src/langium/diagnostics/logger.ts +246 -0
- package/src/langium/diagnostics/lsp-logger.ts +277 -0
- package/src/langium/diagnostics/server-tracer.ts +73 -0
- package/src/langium/document-builder/build-pipeline-integration.ts +193 -0
- package/src/langium/document-builder/document-builder.ts +839 -0
- package/src/langium/document-builder/index.ts +12 -0
- package/src/langium/document-builder/labeled-phase-listener.ts +26 -0
- package/src/langium/documentation/comment-provider.ts +37 -0
- package/src/langium/documentation/index.ts +10 -0
- package/src/langium/integration-services.ts +281 -0
- package/src/langium/integrity/index.ts +12 -0
- package/src/langium/integrity/integrity-contribution.ts +44 -0
- package/src/langium/integrity/integrity-rule.ts +100 -0
- package/src/langium/integrity/integrity-service.ts +423 -0
- package/src/langium/keys/default-element-key-provider.ts +20 -0
- package/src/langium/keys/element-key-provider.ts +114 -0
- package/src/langium/keys/index.ts +13 -0
- package/src/langium/keys/name-based-key-provider.ts +146 -0
- package/src/langium/keys/positional-key-provider.ts +57 -0
- package/src/langium/labeling/index.ts +10 -0
- package/src/langium/labeling/label-provider.ts +110 -0
- package/src/langium/language-module.ts +367 -0
- package/src/langium/language-types.ts +214 -0
- package/src/langium/model-service/index.ts +10 -0
- package/src/langium/model-service/model-service.ts +1051 -0
- package/src/langium/module.ts +446 -0
- package/src/langium/naming/index.ts +11 -0
- package/src/langium/naming/name-provider.ts +533 -0
- package/src/langium/naming/name-separator-validation.ts +73 -0
- package/src/langium/project/abstract-project-manager.ts +630 -0
- package/src/langium/project/index.ts +13 -0
- package/src/langium/project/project-change-event.ts +66 -0
- package/src/langium/project/project-manager.ts +221 -0
- package/src/langium/project/single-project-manager.ts +126 -0
- package/src/langium/residency/cst-residency-service.ts +412 -0
- package/src/langium/residency/index.ts +10 -0
- package/src/langium/scope/ast-node-description-provider.ts +141 -0
- package/src/langium/scope/hydranium-scope-computation.ts +246 -0
- package/src/langium/scope/hydranium-scope-provider.ts +659 -0
- package/src/langium/scope/index.ts +18 -0
- package/src/langium/scope/reference-builder.ts +194 -0
- package/src/langium/scope/reference-candidate-provider.ts +314 -0
- package/src/langium/scope/scope-extension-contribution.ts +34 -0
- package/src/langium/scope/scope-extension-service.ts +207 -0
- package/src/langium/scope/scoped-ast-node-description.ts +174 -0
- package/src/langium/scope/tier-specificity.ts +89 -0
- package/src/langium/serialization/abstract-serializer.ts +474 -0
- package/src/langium/serialization/index.ts +14 -0
- package/src/langium/serialization/json-serializer.ts +264 -0
- package/src/langium/serialization/serialization-util.ts +40 -0
- package/src/langium/serialization/serializer.ts +68 -0
- package/src/langium/serialization/yaml-serializer.ts +348 -0
- package/src/langium/service-registry.ts +323 -0
- package/src/langium/shared-services.ts +107 -0
- package/src/langium/transfer/index.ts +10 -0
- package/src/langium/transfer/transfer-encoder.ts +434 -0
- package/src/langium/update-rewrite/index.ts +14 -0
- package/src/langium/update-rewrite/normalize-empty-strings.ts +86 -0
- package/src/langium/update-rewrite/semantic-root-rewrite.ts +57 -0
- package/src/langium/update-rewrite/update-rewrite-contribution.ts +44 -0
- package/src/langium/update-rewrite/update-rewrite-service.ts +129 -0
- package/src/langium/update-rewrite/update-rewrite.ts +60 -0
- package/src/langium/validation/document-validator.ts +188 -0
- package/src/langium/validation/index.ts +12 -0
- package/src/langium/validation/validation-contribution-collector.ts +61 -0
- package/src/langium/validation/validation-contribution.ts +38 -0
- package/src/langium/workspace/additional-document-contribution.ts +80 -0
- package/src/langium/workspace/document-uri-policy.ts +187 -0
- package/src/langium/workspace/file-system-provider.ts +52 -0
- package/src/langium/workspace/hydranium-langium-document-factory.ts +78 -0
- package/src/langium/workspace/hydranium-workspace-lock.ts +35 -0
- package/src/langium/workspace/hydranium-workspace-manager.ts +412 -0
- package/src/langium/workspace/in-memory-file-system-provider.ts +241 -0
- package/src/langium/workspace/index-manager.ts +266 -0
- package/src/langium/workspace/index.ts +23 -0
- package/src/langium/workspace/initialize-workspace.ts +102 -0
- package/src/langium/workspace/langium-documents.ts +94 -0
- package/src/langium/workspace/persistent-file-system-provider.ts +287 -0
- package/src/langium/workspace/synthetic.ts +63 -0
- package/src/langium/workspace/virtual-document.ts +94 -0
- package/src/langium/workspace/write-lock-scope.ts +88 -0
- package/src/launcher/index.ts +12 -0
- package/src/launcher/integrated-server.ts +28 -0
- package/src/lsp/completion/hydranium-completion-provider.ts +132 -0
- package/src/lsp/hydranium-document-update-handler.ts +345 -0
- package/src/lsp/index.ts +24 -0
- package/src/lsp/instrument-connection.ts +66 -0
- package/src/lsp/language-module.ts +64 -0
- package/src/lsp/semantic-token-provider.ts +215 -0
- package/src/lsp/shared-module.ts +88 -0
- package/src/lsp/start-language-server.ts +68 -0
- package/src/node/ast-ground-truth.ts +76 -0
- package/src/node/event-loop-monitor.ts +89 -0
- package/src/node/index.ts +53 -0
- package/src/node/latency-from-env.ts +39 -0
- package/src/node/lint-grammar.ts +189 -0
- package/src/node/log-file-sink.ts +43 -0
- package/src/node/log-preamble-node.ts +63 -0
- package/src/node/measure-memory.ts +196 -0
- package/src/node/memory-monitor.ts +103 -0
- package/src/node/node-file-system-provider.ts +252 -0
- package/src/node/process-memory.ts +299 -0
- package/src/node/profile-capture.ts +377 -0
- package/src/node/profile-digest.ts +112 -0
- package/src/node/profiling-run.ts +236 -0
- package/src/node/reflect-grammar.ts +182 -0
- package/src/node/server-diagnostics.ts +63 -0
- package/src/node/server-state-snapshot.ts +192 -0
- package/src/node/socket-launcher.ts +210 -0
- package/src/node/stdio-launcher.ts +150 -0
- package/src/node/validate-workspace.ts +133 -0
- package/src/node/write-lock-scope-node.ts +41 -0
- package/src/testing/ast-snapshot.ts +88 -0
- package/src/testing/document-uri-policy-conformance.ts +104 -0
- package/src/testing/fake-description.ts +52 -0
- package/src/testing/fake-document.ts +120 -0
- package/src/testing/fake-reflection.ts +39 -0
- package/src/testing/index.ts +45 -0
- package/src/testing/langium-test-helpers.ts +26 -0
- package/src/testing/make-noop-language-services.ts +47 -0
- package/src/testing/make-noop-shared-services.ts +78 -0
- package/src/testing/make-test-services.ts +356 -0
- package/src/testing/make-test-tracer.ts +92 -0
- package/src/testing/node/generated-workspace.ts +222 -0
- package/src/testing/node/golden-corpus.ts +114 -0
- package/src/testing/node/index.ts +29 -0
- package/src/testing/node/lsp-harness.ts +230 -0
- package/src/testing/node/lsp-server-connection.ts +575 -0
- package/src/testing/node/scratch-workspace.ts +137 -0
- package/src/testing/node/spawned-server.ts +447 -0
- package/src/testing/parse-semantic-root.ts +150 -0
- package/src/testing/playwright/browser-capture-bridge.ts +258 -0
- package/src/testing/playwright/e2e-profiling.ts +362 -0
- package/src/testing/playwright/index.ts +16 -0
- package/src/testing/playwright/server-log-capture.ts +433 -0
- package/src/testing/playwright/server-log-fixture.ts +57 -0
- package/src/testing/playwright/server-log-rename-reporter.ts +29 -0
- package/src/testing/run-update-pipeline.ts +113 -0
- package/src/testing/stub-ast-document-manager.ts +224 -0
- package/src/testing/stub-document-builder.ts +242 -0
- package/src/testing/stub-hydranium-text-documents.ts +270 -0
- package/src/testing/stub-index-manager.ts +79 -0
- package/src/testing/stub-langium-documents.ts +104 -0
- package/src/testing/stub-model-service.ts +72 -0
- package/src/testing/stub-project-manager.ts +161 -0
- package/src/testing/stub-self-save-registry.ts +43 -0
- package/src/testing/stub-service-registry.ts +192 -0
- package/src/testing/stub-writable-file-system.ts +58 -0
- package/src/util/connection-liveness.ts +47 -0
- package/src/util/environment.ts +88 -0
- package/src/util/index.ts +18 -0
- package/src/util/registry.ts +129 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
import { type AstNodeDescription, type ReferenceInfo, type Stream } from '@hydranium/langium';
|
|
11
|
+
import { DefaultCompletionProvider, type CompletionContext, type CompletionValueItem } from '@hydranium/langium/lsp';
|
|
12
|
+
import type { CompletionItem, InsertReplaceEdit } from 'vscode-languageserver';
|
|
13
|
+
import { type ReferenceCandidateProvider } from '../../langium/scope/reference-candidate-provider.js';
|
|
14
|
+
import { type ServerLanguageServices } from '../../langium/language-module.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Completion provider that upgrades Langium's default `TextEdit` to
|
|
18
|
+
* {@link InsertReplaceEdit} so accepting a suggestion over an existing token
|
|
19
|
+
* replaces that token rather than inserting alongside it.
|
|
20
|
+
*
|
|
21
|
+
* **Why this exists.** `DefaultCompletionProvider.buildCompletionTextEdit`
|
|
22
|
+
* returns a range ending at the cursor position, so accepting a suggestion
|
|
23
|
+
* with the caret inside a token leaves the token's tail standing after the
|
|
24
|
+
* inserted text. By widening the `replace` range to the token's end while
|
|
25
|
+
* keeping the original `insert` range at the cursor, LSP clients honour the
|
|
26
|
+
* user's `editor.suggest.insertMode` preference (`insert` = Langium's narrow
|
|
27
|
+
* range, `replace` = overwrite the whole token).
|
|
28
|
+
*
|
|
29
|
+
* **Two cursor positions need widening and Langium's context only describes
|
|
30
|
+
* one of them.** Inside a token, `tokenEndOffset` points past the token and the
|
|
31
|
+
* widening reads straight off it. Sitting at a token's START — right after `= `
|
|
32
|
+
* in `writes Order.status = PAID`, say — the cursor is on whitespace as far as
|
|
33
|
+
* the completion context is concerned, so `tokenEndOffset` describes the
|
|
34
|
+
* whitespace and not the name that follows it. Without {@link getReplaceEndOffset}
|
|
35
|
+
* the item goes out with an EMPTY range and accepting it produces
|
|
36
|
+
* `SHIPPEDPAID`: the suggestion inserted in front of the word it was meant to
|
|
37
|
+
* replace. A `tsserver` in the same position returns a range covering the
|
|
38
|
+
* following word, which is the behaviour matched here.
|
|
39
|
+
*
|
|
40
|
+
* **Capability gating.** {@link InsertReplaceEdit} requires LSP 3.16+
|
|
41
|
+
* (`completionItem.insertReplaceSupport`). Older clients that ignore the
|
|
42
|
+
* wider range fall back to the narrower `insert` range, which matches
|
|
43
|
+
* Langium's original behaviour. A defensive capability check is
|
|
44
|
+
* intentionally not added so the framework default stays simple —
|
|
45
|
+
* consumers that need to support pre-3.16 clients can override and emit a
|
|
46
|
+
* plain `TextEdit`.
|
|
47
|
+
*
|
|
48
|
+
* **Candidate gathering is delegated.** Cross-reference completion reuses
|
|
49
|
+
* the {@link ReferenceCandidateProvider} pipeline (filter, canonical
|
|
50
|
+
* tier-sibling collapse, name-dedup, sort) by overriding
|
|
51
|
+
* {@link getReferenceCandidates} to return the candidate provider's scope
|
|
52
|
+
* elements. The provider owns that pipeline in one place, so the
|
|
53
|
+
* text-editor dropdown and the protocol candidate picker stay in sync; this
|
|
54
|
+
* class keeps only the LSP-specific {@link fillCompletionItem} upgrade.
|
|
55
|
+
*/
|
|
56
|
+
export class HydraniumCompletionProvider extends DefaultCompletionProvider {
|
|
57
|
+
protected readonly candidateProvider: ReferenceCandidateProvider;
|
|
58
|
+
|
|
59
|
+
constructor(services: ServerLanguageServices) {
|
|
60
|
+
super(services);
|
|
61
|
+
this.candidateProvider = services.references.CandidateProvider;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Delegate cross-reference candidate gathering to the candidate provider
|
|
66
|
+
* so the LSP completion dropdown applies the same filter / canonical
|
|
67
|
+
* tier-sibling collapse / name-dedup / sort as the protocol candidate
|
|
68
|
+
* picker. Langium hands us the built {@link ReferenceInfo}, which the
|
|
69
|
+
* candidate provider's `getCandidateScope` accepts directly, so the
|
|
70
|
+
* merged path walks the scope exactly once.
|
|
71
|
+
*/
|
|
72
|
+
protected override getReferenceCandidates(refInfo: ReferenceInfo, _context: CompletionContext): Stream<AstNodeDescription> {
|
|
73
|
+
return this.candidateProvider.getCandidateScope(refInfo).elementScope.getAllElements();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
protected override fillCompletionItem(context: CompletionContext, item: CompletionValueItem): CompletionItem | undefined {
|
|
77
|
+
const completionItem = super.fillCompletionItem(context, item);
|
|
78
|
+
if (!completionItem?.textEdit || 'insert' in completionItem.textEdit) {
|
|
79
|
+
return completionItem;
|
|
80
|
+
}
|
|
81
|
+
const replaceEndOffset = this.getReplaceEndOffset(context);
|
|
82
|
+
// Nothing to the right of the cursor that a suggestion would stand in for
|
|
83
|
+
// (completion on whitespace, on punctuation, at end of file) — the
|
|
84
|
+
// parent's narrow range is already correct.
|
|
85
|
+
if (replaceEndOffset <= context.offset) {
|
|
86
|
+
return completionItem;
|
|
87
|
+
}
|
|
88
|
+
const baseEdit = completionItem.textEdit;
|
|
89
|
+
const insertReplaceEdit: InsertReplaceEdit = {
|
|
90
|
+
newText: baseEdit.newText,
|
|
91
|
+
insert: baseEdit.range,
|
|
92
|
+
replace: { start: baseEdit.range.start, end: context.textDocument.positionAt(replaceEndOffset) }
|
|
93
|
+
};
|
|
94
|
+
completionItem.textEdit = insertReplaceEdit;
|
|
95
|
+
return completionItem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Offset the `replace` range should end at: the end of the text a suggestion
|
|
100
|
+
* accepted here would stand in for, or `context.offset` when there is none.
|
|
101
|
+
*
|
|
102
|
+
* Two sources, because Langium's completion context describes the token the
|
|
103
|
+
* completion is FOR and that is not always the text under the cursor:
|
|
104
|
+
*
|
|
105
|
+
* - **Cursor inside a token** — `tokenEndOffset` already points past it.
|
|
106
|
+
* - **Cursor at a token's start** — the context describes the preceding
|
|
107
|
+
* whitespace, so `tokenEndOffset` is at or behind the cursor and the name
|
|
108
|
+
* to the right has to be measured from the document text.
|
|
109
|
+
*
|
|
110
|
+
* Scanning stops at the first character `GrammarConfig.nameRegexp` rejects, so
|
|
111
|
+
* a run only ever covers one name: a cursor before `Order` in `Order.status`
|
|
112
|
+
* widens to the end of `Order` and not through the dot.
|
|
113
|
+
*
|
|
114
|
+
* Adopters whose grammar has a wider notion of a replaceable token than
|
|
115
|
+
* "consecutive name characters" — a quoted or dotted identifier — override
|
|
116
|
+
* this rather than {@link fillCompletionItem}.
|
|
117
|
+
*/
|
|
118
|
+
protected getReplaceEndOffset(context: CompletionContext): number {
|
|
119
|
+
if (context.tokenEndOffset > context.offset) {
|
|
120
|
+
return context.tokenEndOffset;
|
|
121
|
+
}
|
|
122
|
+
// `getText()` with no range returns the document's stored string rather
|
|
123
|
+
// than a copy, so reading it per item costs nothing.
|
|
124
|
+
const text = context.textDocument.getText();
|
|
125
|
+
const nameRegexp = this.grammarConfig.nameRegexp;
|
|
126
|
+
let end = context.offset;
|
|
127
|
+
while (end < text.length && nameRegexp.test(text.charAt(end))) {
|
|
128
|
+
end++;
|
|
129
|
+
}
|
|
130
|
+
return end;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
import { Debouncer, type Logger, ObservableValue, type MaybeObservableValue } from '@hydranium/protocol';
|
|
11
|
+
import { URI, UriUtils } from '@hydranium/langium';
|
|
12
|
+
import { DefaultDocumentUpdateHandler } from '@hydranium/langium/lsp';
|
|
13
|
+
import { type HydraniumDocumentBuilder } from '../langium/document-builder/document-builder.js';
|
|
14
|
+
import { type ServerSharedServices } from '../langium/module.js';
|
|
15
|
+
import { LANGUAGE_CLIENT_ID } from '../documents/client-ids.js';
|
|
16
|
+
import { type SelfSaveRegistry } from '../documents/self-save-registry.js';
|
|
17
|
+
import { type WritableFileSystemProvider } from '../documents/ast-document-manager.js';
|
|
18
|
+
import { type HydraniumTextDocuments } from '../documents/hydranium-text-documents.js';
|
|
19
|
+
import { type DidChangeWatchedFilesParams, type FileEvent, FileChangeType, type TextDocumentChangeEvent } from 'vscode-languageserver';
|
|
20
|
+
import { type TextDocument } from 'vscode-languageserver-textdocument';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Default LSP-event reasons stamped by {@link HydraniumDocumentUpdateHandler}
|
|
24
|
+
* onto the next `documentBuilder.update` call via `markNextReason`. Exposed
|
|
25
|
+
* so adopters subclassing the handler can layer additional reasons or rename
|
|
26
|
+
* existing ones without losing the canonical names the framework emits.
|
|
27
|
+
*/
|
|
28
|
+
export const HYDRANIUM_BUILD_REASONS = Object.freeze({
|
|
29
|
+
didOpen: 'didOpen',
|
|
30
|
+
didChangeContent: 'didChangeContent',
|
|
31
|
+
didChangeWatchedFiles: 'didChangeWatchedFiles',
|
|
32
|
+
didClose: 'didClose'
|
|
33
|
+
} as const);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Construction options for {@link HydraniumDocumentUpdateHandler}.
|
|
37
|
+
*/
|
|
38
|
+
export interface HydraniumDocumentUpdateHandlerOptions {
|
|
39
|
+
/**
|
|
40
|
+
* Trailing-edge debounce window. `0` (the default) disables
|
|
41
|
+
* debouncing — `didChangeContent` flows synchronously into
|
|
42
|
+
* `fireDocumentUpdate` as in Langium's default. Accepts an
|
|
43
|
+
* {@link MaybeObservableValue} so adopters can bind to a user setting via
|
|
44
|
+
* `Settings.number`; updates to the underlying snapshot reshape
|
|
45
|
+
* the live debounce window without rebuilding the handler.
|
|
46
|
+
*/
|
|
47
|
+
readonly debounceMs?: MaybeObservableValue<number>;
|
|
48
|
+
/**
|
|
49
|
+
* Bypass debouncing for changes whose author is anything other
|
|
50
|
+
* than the language client (Monaco). GLSP / form-editor /
|
|
51
|
+
* integrity-rule author changes are already coalesced upstream —
|
|
52
|
+
* debouncing them adds latency for no benefit. Default `true`.
|
|
53
|
+
*
|
|
54
|
+
* Adopters disable this when they want uniform debouncing
|
|
55
|
+
* regardless of source (rare — typically only for synthetic
|
|
56
|
+
* load tests).
|
|
57
|
+
*/
|
|
58
|
+
readonly bypassNonLanguageClientChanges?: boolean;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Framework `DocumentUpdateHandler` adding these behaviours over Langium's
|
|
63
|
+
* default:
|
|
64
|
+
*
|
|
65
|
+
* 1. **Self-save filter** ({@link filterSelfSaves}) — drops
|
|
66
|
+
* watched-file-change echoes for the server's own writes via
|
|
67
|
+
* {@link SelfSaveRegistry}, keyed by `fsPath` + mtime.
|
|
68
|
+
* 2. **Trailing-edge debouncing** — collapses rapid
|
|
69
|
+
* `didChangeContent` calls into one rebuild on the trailing
|
|
70
|
+
* edge of the configured window. Non-language-client author
|
|
71
|
+
* changes and watched-file changes bypass the debounce (their
|
|
72
|
+
* producers are already coalesced).
|
|
73
|
+
* 3. **Build-reason stamping** — the LSP event overrides
|
|
74
|
+
* (`didOpenDocument`, `didChangeContent`, `didChangeWatchedFiles`,
|
|
75
|
+
* `didCloseDocument`) populate {@link nextReason} with a canonical
|
|
76
|
+
* reason string. {@link fireDocumentUpdate} captures the reason;
|
|
77
|
+
* {@link dispatch} stages it on the builder via
|
|
78
|
+
* {@link HydraniumDocumentBuilder.markNextReason}, so a subclass that
|
|
79
|
+
* formats build logs can tag its line with the event that caused the
|
|
80
|
+
* build without per-adopter wiring to capture it.
|
|
81
|
+
* 4. **Last-client-close rebuild trigger** ({@link didCloseDocument}) —
|
|
82
|
+
* when the final client closes a document, dispatch a build so the
|
|
83
|
+
* LangiumDocument's `textDocument` is refreshed (from disk for `file:`
|
|
84
|
+
* URIs, or removed from the index for ephemeral URIs). Langium's
|
|
85
|
+
* default handler does not implement `didCloseDocument`, so the
|
|
86
|
+
* in-memory text of the last writer would otherwise persist.
|
|
87
|
+
*
|
|
88
|
+
* Adopters with their own handler subclass should extend this class
|
|
89
|
+
* (not Langium's `DefaultDocumentUpdateHandler`) so all of them are
|
|
90
|
+
* preserved. The {@link dispatch} hook is the canonical override
|
|
91
|
+
* point for adopters that need to stamp additional per-build metadata
|
|
92
|
+
* inside the workspace-lock callback.
|
|
93
|
+
*/
|
|
94
|
+
export class HydraniumDocumentUpdateHandler extends DefaultDocumentUpdateHandler {
|
|
95
|
+
/**
|
|
96
|
+
* Narrow Langium's `DefaultDocumentUpdateHandler.documentBuilder` typing to
|
|
97
|
+
* the framework subclass: `markNextReason` is the only method this handler
|
|
98
|
+
* reaches for beyond the Langium interface.
|
|
99
|
+
*/
|
|
100
|
+
declare protected readonly documentBuilder: HydraniumDocumentBuilder;
|
|
101
|
+
|
|
102
|
+
protected readonly logger: Logger;
|
|
103
|
+
protected readonly selfSaveRegistry: SelfSaveRegistry;
|
|
104
|
+
protected readonly fileSystemProvider: WritableFileSystemProvider;
|
|
105
|
+
protected readonly textDocuments: HydraniumTextDocuments<TextDocument>;
|
|
106
|
+
|
|
107
|
+
/** Live debounce window — a constant or a setting-bound cell; read `.value` per flush. */
|
|
108
|
+
protected readonly debounce: ObservableValue<number>;
|
|
109
|
+
protected readonly bypassNonLanguageClientChanges: boolean;
|
|
110
|
+
|
|
111
|
+
/** Accumulated changed / deleted URIs awaiting the next debounced flush. Keyed by URI string so duplicates merge. */
|
|
112
|
+
protected pendingChanged = new Map<string, URI>();
|
|
113
|
+
protected pendingDeleted = new Map<string, URI>();
|
|
114
|
+
/** Trailing-edge timing for the coalesced flush; the pending sets above are the payload it drains. */
|
|
115
|
+
protected readonly flushDebouncer: Debouncer;
|
|
116
|
+
/** Flush on the next `fireDocumentUpdate` instead of debouncing — set by the LSP event handlers when the source isn't typing. */
|
|
117
|
+
protected immediateFlush = false;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Build-reason for the next `fireDocumentUpdate`, stamped by the LSP
|
|
121
|
+
* event overrides. `??=` semantics in `didChangeContent` preserve a
|
|
122
|
+
* prior `'didOpen'` stamp because Langium fires `didOpen` then
|
|
123
|
+
* `didChangeContent` on document open — the open semantics are the
|
|
124
|
+
* authoritative trigger for that pair, not the content change.
|
|
125
|
+
*/
|
|
126
|
+
protected nextReason?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Build-reason captured at `fireDocumentUpdate` time, drained by
|
|
129
|
+
* {@link dispatch} into `markNextReason`. Survives across debounced
|
|
130
|
+
* batches (`?? pendingReason` in `fireDocumentUpdate` retains the
|
|
131
|
+
* first reason in a coalesced burst).
|
|
132
|
+
*/
|
|
133
|
+
protected pendingReason?: string;
|
|
134
|
+
|
|
135
|
+
constructor(services: ServerSharedServices, options: HydraniumDocumentUpdateHandlerOptions = {}) {
|
|
136
|
+
super(services);
|
|
137
|
+
this.logger = services.Logger;
|
|
138
|
+
this.selfSaveRegistry = services.workspace.SelfSaveRegistry;
|
|
139
|
+
this.fileSystemProvider = services.workspace.FileSystemProvider;
|
|
140
|
+
this.textDocuments = services.workspace.TextDocuments;
|
|
141
|
+
this.debounce = ObservableValue.from(options.debounceMs ?? 0);
|
|
142
|
+
this.flushDebouncer = new Debouncer(services.Clock, () => this.flushPending(), { delayMs: this.debounce });
|
|
143
|
+
this.bypassNonLanguageClientChanges = options.bypassNonLanguageClientChanges ?? true;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
didOpenDocument(_change: TextDocumentChangeEvent<TextDocument>): void {
|
|
147
|
+
// Langium also fires `didChangeContent` on open, which is what triggers
|
|
148
|
+
// `fireDocumentUpdate`. Stamp the reason here so the trailing
|
|
149
|
+
// `didChangeContent` preserves it via `??=`. Bypass debouncing so the
|
|
150
|
+
// LangiumDocument is in the index before consumers (model service,
|
|
151
|
+
// form-editor, GLSP) try to read it.
|
|
152
|
+
this.nextReason = HYDRANIUM_BUILD_REASONS.didOpen;
|
|
153
|
+
this.immediateFlush = true;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
override didChangeContent(change: TextDocumentChangeEvent<TextDocument>): void {
|
|
157
|
+
// `??=` preserves a prior `'didOpen'` stamp (Langium fires didOpen
|
|
158
|
+
// immediately before didChangeContent on document open).
|
|
159
|
+
this.nextReason ??= HYDRANIUM_BUILD_REASONS.didChangeContent;
|
|
160
|
+
// Bypass debouncing for non-Monaco author changes (GLSP node moves, form-editor
|
|
161
|
+
// saves, integrity-rule mutations) — their producers already coalesce upstream.
|
|
162
|
+
if (this.bypassNonLanguageClientChanges && this.textDocuments.getAuthor(change.document.uri) !== LANGUAGE_CLIENT_ID) {
|
|
163
|
+
this.immediateFlush = true;
|
|
164
|
+
}
|
|
165
|
+
super.didChangeContent(change);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Last-client close is the missing rebuild trigger in Langium's
|
|
170
|
+
* `DefaultDocumentUpdateHandler`: `documents.onDidClose` fires on every
|
|
171
|
+
* per-client close, but the default handler ignores the event entirely.
|
|
172
|
+
* For multi-client servers this leaves the LangiumDocument carrying the
|
|
173
|
+
* unsaved in-memory `textDocument` of the last writer until something
|
|
174
|
+
* else triggers a rebuild — integrity rules walking `langiumDocuments.all`
|
|
175
|
+
* then see stale text long after the user discarded their edits.
|
|
176
|
+
*
|
|
177
|
+
* We funnel the last-client transition through the same dispatch path
|
|
178
|
+
* the other LSP events use, so the rebuild gets debouncing, workspace
|
|
179
|
+
* locking, build-reason stamping, and `markNextReason` for free. The
|
|
180
|
+
* scheme split governs the `DocumentBuilder.update` shape:
|
|
181
|
+
*
|
|
182
|
+
* - **`file:` URI** → `update([uri], [])`. Routes through
|
|
183
|
+
* `LangiumDocuments.invalidateDocument` (doc stays in the trie) and
|
|
184
|
+
* `LangiumDocumentFactory.update`, which consults the LSP-tracked
|
|
185
|
+
* open-documents map first. That map is cleared LATER in the same
|
|
186
|
+
* synchronous `notifyDidCloseTextDocument` call that fires this event,
|
|
187
|
+
* and {@link dispatch} defers the build behind `workspaceManager.ready`
|
|
188
|
+
* — so by the time the factory looks, the URI is gone: it falls back to
|
|
189
|
+
* `FileSystemProvider.readFile` and the doc rebuilds from disk,
|
|
190
|
+
* Langium's canonical close-without-save semantic. A dispatch made
|
|
191
|
+
* synchronously here would still see the open document and re-read the
|
|
192
|
+
* in-memory text instead.
|
|
193
|
+
* - **non-`file:` URI** (`builtin:`, `untitled:`) → no dispatch.
|
|
194
|
+
* Adopter-loaded schemes — documents pulled in via
|
|
195
|
+
* `loadAdditionalDocuments` — need to stay in the workspace index;
|
|
196
|
+
* dropping them on close would break every cross-reference that
|
|
197
|
+
* targets them. The framework cannot enumerate adopter schemes, so the
|
|
198
|
+
* safe default is "leave alone unless it's a file." Adopters that need
|
|
199
|
+
* ephemeral-URI cleanup handle it explicitly.
|
|
200
|
+
*
|
|
201
|
+
* Per-client closes (where other clients still hold the URI) are
|
|
202
|
+
* suppressed via {@link HydraniumTextDocuments.isOpenInAnyClient}.
|
|
203
|
+
*/
|
|
204
|
+
didCloseDocument(change: TextDocumentChangeEvent<TextDocument>): void {
|
|
205
|
+
if (this.textDocuments.isOpenInAnyClient(change.document.uri)) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const uri = URI.parse(change.document.uri);
|
|
209
|
+
if (uri.scheme !== 'file') {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
this.nextReason = HYDRANIUM_BUILD_REASONS.didClose;
|
|
213
|
+
this.immediateFlush = true;
|
|
214
|
+
this.fireDocumentUpdate([uri], []);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
override didChangeWatchedFiles(params: DidChangeWatchedFilesParams): void {
|
|
218
|
+
void this.filterSelfSaves(params)
|
|
219
|
+
.then(filtered => {
|
|
220
|
+
if (filtered.changes.length === 0) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
// External file-system changes are authoritative — overwrite any
|
|
224
|
+
// pending reason (typically empty here; could be `didChangeContent`
|
|
225
|
+
// if a watcher event raced an in-flight Monaco edit, in which case
|
|
226
|
+
// the watcher event is the more interesting trigger to log).
|
|
227
|
+
this.nextReason = HYDRANIUM_BUILD_REASONS.didChangeWatchedFiles;
|
|
228
|
+
// External file-system changes are discrete events — flush immediately
|
|
229
|
+
// rather than coalescing with in-flight Monaco typing.
|
|
230
|
+
this.immediateFlush = true;
|
|
231
|
+
super.didChangeWatchedFiles(filtered);
|
|
232
|
+
})
|
|
233
|
+
.catch(err => {
|
|
234
|
+
// The rejection would otherwise reach the process-level
|
|
235
|
+
// `unhandledRejection` listener, which reports neither the URIs nor
|
|
236
|
+
// the fact that a watched-file rebuild was dropped — leaving the
|
|
237
|
+
// workspace diverged from disk with no diagnostic and no retry.
|
|
238
|
+
const detail = err instanceof Error ? (err.stack ?? err.message) : String(err);
|
|
239
|
+
const uris = params.changes.map(change => change.uri).join(', ');
|
|
240
|
+
this.logger.error(`Watched-file update dropped for ${uris}. ${detail}`);
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Drop watched-file changes whose path + mtime match a recent self-save
|
|
246
|
+
* record. Deletions always pass (no mtime); stat failures pass (the
|
|
247
|
+
* change is real enough). Keyed by `fsPath` to avoid URI-form
|
|
248
|
+
* mismatches between watcher payloads and write-time records. Stats run
|
|
249
|
+
* in parallel — order in the output is irrelevant; the consumer
|
|
250
|
+
* aggregates URIs into changed/deleted sets.
|
|
251
|
+
*/
|
|
252
|
+
protected async filterSelfSaves(params: DidChangeWatchedFilesParams): Promise<DidChangeWatchedFilesParams> {
|
|
253
|
+
const kept = await Promise.all(
|
|
254
|
+
params.changes.map(async change => {
|
|
255
|
+
if (change.type === FileChangeType.Deleted) {
|
|
256
|
+
return change;
|
|
257
|
+
}
|
|
258
|
+
const uri = UriUtils.toUri(change.uri);
|
|
259
|
+
const mtimeMs = await this.fileSystemProvider.mtimeMs?.(uri);
|
|
260
|
+
if (mtimeMs !== undefined && this.selfSaveRegistry.matches(uri.fsPath, mtimeMs)) {
|
|
261
|
+
return undefined;
|
|
262
|
+
}
|
|
263
|
+
return change;
|
|
264
|
+
})
|
|
265
|
+
);
|
|
266
|
+
return { changes: kept.filter((change): change is FileEvent => change !== undefined) };
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Coalesce `changed` / `deleted` into the pending sets, then either
|
|
271
|
+
* flush immediately (`immediateFlush` or `debounceMs <= 0`) or restart
|
|
272
|
+
* the trailing-edge timer. Subclasses that need to stamp per-build
|
|
273
|
+
* metadata can override and inspect the merged sets — but the canonical
|
|
274
|
+
* override point for the workspace-lock callback is {@link dispatch},
|
|
275
|
+
* not this method.
|
|
276
|
+
*/
|
|
277
|
+
protected override fireDocumentUpdate(changed: URI[], deleted: URI[]): void {
|
|
278
|
+
// Capture the reason set by the LSP event handler immediately before
|
|
279
|
+
// we merge into the pending sets. `?? pendingReason` keeps the
|
|
280
|
+
// first reason in a coalesced burst (LSP events arriving inside an
|
|
281
|
+
// active debounce window all stamp the same `pendingReason` once,
|
|
282
|
+
// because subsequent stamps see the field already non-undefined).
|
|
283
|
+
this.pendingReason = this.nextReason ?? this.pendingReason;
|
|
284
|
+
this.nextReason = undefined;
|
|
285
|
+
for (const uri of changed) {
|
|
286
|
+
this.pendingChanged.set(uri.toString(), uri);
|
|
287
|
+
}
|
|
288
|
+
for (const uri of deleted) {
|
|
289
|
+
const key = uri.toString();
|
|
290
|
+
this.pendingDeleted.set(key, uri);
|
|
291
|
+
this.pendingChanged.delete(key);
|
|
292
|
+
}
|
|
293
|
+
if (this.immediateFlush || this.debounce.value <= 0) {
|
|
294
|
+
this.immediateFlush = false;
|
|
295
|
+
this.flushPending(); // cancels any armed flush, then drains
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
this.flushDebouncer.schedule();
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Drain the pending sets and dispatch a single build. Public so tests
|
|
303
|
+
* can flush deterministically and shutdown paths can drain any
|
|
304
|
+
* trailing-edge updates that would otherwise be lost when the timer
|
|
305
|
+
* never fires.
|
|
306
|
+
*/
|
|
307
|
+
public flushPending(): void {
|
|
308
|
+
this.flushDebouncer.cancel();
|
|
309
|
+
const changed = Array.from(this.pendingChanged.values());
|
|
310
|
+
const deleted = Array.from(this.pendingDeleted.values());
|
|
311
|
+
this.pendingChanged.clear();
|
|
312
|
+
this.pendingDeleted.clear();
|
|
313
|
+
if (changed.length === 0 && deleted.length === 0) {
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
this.dispatch(changed, deleted);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Workspace-lock + `documentBuilder.update` call for the merged sets.
|
|
321
|
+
* Mirrors Langium's `super.fireDocumentUpdate` body plus
|
|
322
|
+
* `markNextReason(pendingReason)` inside the write-lock callback, so the
|
|
323
|
+
* build the lock is about to run carries the LSP event that triggered it.
|
|
324
|
+
* Adopters override to stamp additional per-build metadata — the canonical
|
|
325
|
+
* pattern is to read the reason via `this.pendingReason`, call
|
|
326
|
+
* `super.dispatch(...)` or replicate the
|
|
327
|
+
* `workspaceManager.ready -> workspaceLock.write` block, and add
|
|
328
|
+
* adopter-specific behaviour inside the write callback.
|
|
329
|
+
*/
|
|
330
|
+
protected dispatch(changed: URI[], deleted: URI[]): void {
|
|
331
|
+
const reason = this.pendingReason;
|
|
332
|
+
this.pendingReason = undefined;
|
|
333
|
+
this.workspaceManager.ready
|
|
334
|
+
.then(() =>
|
|
335
|
+
this.workspaceLock.write(token => {
|
|
336
|
+
this.documentBuilder.markNextReason(reason);
|
|
337
|
+
return this.documentBuilder.update(changed, deleted, token);
|
|
338
|
+
})
|
|
339
|
+
)
|
|
340
|
+
.catch(err => {
|
|
341
|
+
const detail = err instanceof Error ? (err.stack ?? err.message) : String(err);
|
|
342
|
+
this.logger.error(`Workspace initialization failed. Could not perform document update. ${detail}`);
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
package/src/lsp/index.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
export * from './completion/hydranium-completion-provider.js';
|
|
11
|
+
export * from './instrument-connection.js';
|
|
12
|
+
export * from './semantic-token-provider.js';
|
|
13
|
+
export * from './language-module.js';
|
|
14
|
+
export * from './shared-module.js';
|
|
15
|
+
export * from './hydranium-document-update-handler.js';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The LSP server entry point, so adopters get a unified import surface for the
|
|
19
|
+
* head: framework overrides + the start function live behind one
|
|
20
|
+
* `@hydranium/core/lsp` subpath, mirroring Langium's own `langium/lsp`
|
|
21
|
+
* convention. Signature-compatible with Langium's `startLanguageServer`, plus
|
|
22
|
+
* a guard that the head's shared module was composed.
|
|
23
|
+
*/
|
|
24
|
+
export * from './start-language-server.js';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
import type { LatencyCollector } from '@hydranium/protocol';
|
|
11
|
+
|
|
12
|
+
type RequestHandler = (...args: unknown[]) => unknown;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Wrap an LSP `Connection` so every request handler registered through
|
|
16
|
+
* `onRequest` is timed into `latency` under its method name — the LSP analog of
|
|
17
|
+
* the data-server RPC chokepoint. Langium's `startLanguageServer` registers
|
|
18
|
+
* `onCompletion`/`onHover`/… one handler at a time, so there is no single
|
|
19
|
+
* dispatch point; but every registration funnels through the ONE `onRequest`
|
|
20
|
+
* on the shared `Connection`, so decorating it catches every method with no
|
|
21
|
+
* Langium fork and no per-handler code.
|
|
22
|
+
*
|
|
23
|
+
* Opt in where the head creates the connection, before it hands it to the
|
|
24
|
+
* services factory — wrapping it afterwards is too late, because Langium has
|
|
25
|
+
* already registered its handlers against the raw connection.
|
|
26
|
+
*
|
|
27
|
+
* `onRequest` has several overloads: most register a handler for a specific
|
|
28
|
+
* method (a string, or a typed request whose `.method` names it) and one is the
|
|
29
|
+
* `StarRequestHandler` catch-all `onRequest(handler)`. The star form fires only
|
|
30
|
+
* for methods with no registered handler, so timing it would be misleading — it
|
|
31
|
+
* is passed through untouched. Every other member of the connection is
|
|
32
|
+
* forwarded unchanged.
|
|
33
|
+
*
|
|
34
|
+
* When `latency` is `undefined` the seam is off: the connection is returned
|
|
35
|
+
* unchanged (no Proxy, no per-request timing), so a head can pass the result of
|
|
36
|
+
* an env-gated factory (`latencyFromEnv()`) straight through and pay nothing
|
|
37
|
+
* when latency is not enabled.
|
|
38
|
+
*/
|
|
39
|
+
export function instrumentLspConnection<C extends object>(connection: C, latency: LatencyCollector | undefined): C {
|
|
40
|
+
if (!latency) {
|
|
41
|
+
return connection;
|
|
42
|
+
}
|
|
43
|
+
return new Proxy(connection, {
|
|
44
|
+
get(target, property, receiver): unknown {
|
|
45
|
+
const value: unknown = Reflect.get(target, property, receiver);
|
|
46
|
+
if (property !== 'onRequest' || typeof value !== 'function') {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
const onRequest = value as (...args: unknown[]) => unknown;
|
|
50
|
+
return (...args: unknown[]): unknown => {
|
|
51
|
+
const [first, handler] = args;
|
|
52
|
+
// Star form `onRequest(handler)` — pass through; it is not a timer.
|
|
53
|
+
if (typeof first === 'function' || typeof handler !== 'function') {
|
|
54
|
+
return onRequest.apply(target, args);
|
|
55
|
+
}
|
|
56
|
+
const method = typeof first === 'string' ? first : (first as { method?: unknown }).method;
|
|
57
|
+
if (typeof method !== 'string') {
|
|
58
|
+
return onRequest.apply(target, args);
|
|
59
|
+
}
|
|
60
|
+
const original = handler as RequestHandler;
|
|
61
|
+
const timed: RequestHandler = (...handlerArgs) => latency.time(method, () => original(...handlerArgs));
|
|
62
|
+
return onRequest.apply(target, [first, timed, ...args.slice(2)]);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
import { type Module } from '@hydranium/langium';
|
|
11
|
+
import { type ServerLanguageServices } from '../langium/language-module.js';
|
|
12
|
+
import { type ServerModuleContext } from '../langium/module.js';
|
|
13
|
+
import { type PartialLangiumServices } from '@hydranium/langium/lsp';
|
|
14
|
+
import { HydraniumCompletionProvider } from './completion/hydranium-completion-provider.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Language-level slots contributed by the LSP-textual protocol head.
|
|
18
|
+
* Bound by {@link createLspServerLanguageModule}; consumer modules
|
|
19
|
+
* layered after it can override any slot.
|
|
20
|
+
*
|
|
21
|
+
* - {@link HydraniumCompletionProvider} upgrades Langium's default
|
|
22
|
+
* `TextEdit` to an `InsertReplaceEdit` so the user's
|
|
23
|
+
* `editor.suggest.insertMode` preference is honoured.
|
|
24
|
+
*
|
|
25
|
+
* The head's SHARED-tier slots are bound by
|
|
26
|
+
* `createLspServerSharedModule` instead: `lsp.DocumentUpdateHandler`
|
|
27
|
+
* exists once per server rather than once per grammar, so binding it here is
|
|
28
|
+
* inert — nothing reads a per-language one.
|
|
29
|
+
*/
|
|
30
|
+
export interface LspServerAddedServices {
|
|
31
|
+
lsp: {
|
|
32
|
+
/* override */ CompletionProvider: HydraniumCompletionProvider;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Full language-service surface visible to consumers that compose this
|
|
38
|
+
* head: `@hydranium/core`'s bindings plus the LSP-textual additions. Use as
|
|
39
|
+
* the `T` type parameter for the consumer's own
|
|
40
|
+
* `Module<LspServerLanguageServices, ...>` if its overrides depend on
|
|
41
|
+
* any LSP-only slot.
|
|
42
|
+
*/
|
|
43
|
+
export type LspServerLanguageServices = ServerLanguageServices & LspServerAddedServices;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The LSP-textual protocol head's default language module. Composes on
|
|
47
|
+
* top of `createServerLanguageModule` — as a later `inject(...)`
|
|
48
|
+
* argument, or as `languageModules.extra` when composing through
|
|
49
|
+
* `createIntegrationServices`; the adopter's own language module goes after
|
|
50
|
+
* it either way.
|
|
51
|
+
*
|
|
52
|
+
* `createServerLanguageModule` MUST be merged before this one — the
|
|
53
|
+
* lsp-server head only contributes LSP-textual-specific slots and
|
|
54
|
+
* relies on `@hydranium/core`'s references / naming bindings being present.
|
|
55
|
+
*/
|
|
56
|
+
export function createLspServerLanguageModule(
|
|
57
|
+
_context: ServerModuleContext
|
|
58
|
+
): Module<LspServerLanguageServices, PartialLangiumServices & LspServerAddedServices> {
|
|
59
|
+
return {
|
|
60
|
+
lsp: {
|
|
61
|
+
CompletionProvider: services => new HydraniumCompletionProvider(services)
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|