Skip to content

Conversation

@pullfrog
Copy link

@pullfrog pullfrog bot commented Dec 19, 2025

Summary

Adds tree-sitter injection rules for arktype syntax highlighting in TypeScript and JavaScript files. This enables proper syntax highlighting for string and template string arguments passed to arktype functions.

Changes

  • Added injection rules to typescript/injections.scm for arktype function patterns
  • Added injection rules to javascript/injections.scm for arktype function patterns

Supported Patterns

Function calls:

  • type(), generic(), scope(), define(), match(), fn(), module()
  • Any function starting with ark or Ark (e.g., arkType())

Chained methods:

  • .and(), .or(), .case(), .in(), .extends(), .ifExtends()
  • .intersect(), .merge(), .exclude(), .extract()
  • .overlaps(), .subsumes(), .to(), .satisfies()

Special functions:

  • regex() function with regex language injection

String and template string arguments are highlighted with TypeScript syntax, matching arktype's DSL which uses TypeScript-like type syntax.

Reference

Based on the existing arktype TextMate grammar rules: https://github.com/arktypeio/arktype/blob/main/ark/extension/injected.tmLanguage.json

Pullfrog  | Triggered by Pullfrog | Using Claude CodeView workflow runpullfrog.com𝕏

Adds tree-sitter injection rules for arktype function calls in
TypeScript and JavaScript files. This enables syntax highlighting
for string and template string arguments passed to arktype functions.

Supported patterns:
- arktype function calls: type(), generic(), scope(), define(), match(), fn(), module(), ark*()
- Chained method calls: .and(), .or(), .case(), .in(), .extends(), .ifExtends(), .intersect(), .merge(), .exclude(), .extract(), .overlaps(), .subsumes(), .to(), .satisfies()
- regex() function with regex language injection

String and template string arguments are highlighted with TypeScript
syntax, matching arktype's DSL which uses TypeScript-like syntax.
@pullfrog
Copy link
Author

pullfrog bot commented Dec 19, 2025

Pullfrog  | Review this ➔pullfrog.com

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