Skip to content

Conversation

@Groupguanfang
Copy link
Contributor

Add ArkTS language support with .ets extension

Description

This PR adds support for ArkTS as a new programming language in Linguist. ArkTS is a superset of TypeScript used for HarmonyOS development, featuring additional language constructs like struct declarations, HarmonyOS-specific decorators, and APIs.

The changes include:

  • Added ArkTS as a new language in languages.yml with .ets file extension
  • Added official ArkTS syntax highlighting grammar from the ohosvscode/arkTS repository
  • Added real-world sample files demonstrating typical ArkTS usage patterns
  • Configured proper TextMate scope (source.ets) and language ID

Checklist:

  • I am adding a new extension to a language.

  • I am adding a new language.

  • I am fixing a misclassified language

    • I have included a new sample for the misclassified language:
      • Sample source(s):
        • [URL to each sample source, if applicable]
      • Sample license(s):
    • I have included a change to the heuristics to distinguish my language from others using the same extension.
  • I am changing the source of a syntax highlighting grammar

    • Old: [URL to grammar repo]
    • New: [URL to grammar repo]
  • I am updating a grammar submodule

    • Added vendor/grammars/ArkTS submodule pointing to ohosvscode/arkTS
    • Updated grammars.yml to map the grammar to source.ets scope
    • Updated vendor/README.md to include the new grammar
  • I am adding new or changing current functionality

    • I have added or updated the tests for the new or changed functionality.
  • I am changing the color associated with a language

    • I have obtained agreement from the wider language community on this color change.
      • [URL to public discussion]
      • [Optional: URL to official branding guidelines for the language]

Groupguanfang and others added 4 commits September 22, 2025 03:47
- Add ArkTS as a new programming language with .ets file extension
- Configure syntax highlighting using TextMate grammar from ohosvscode/arkTS
- Add real-world ArkTS samples from HarmonyOS development (Index.ets, EntryAbility.ets, EntryBackupAbility.ets)
- Set language ID using script/update-ids (56341321) and color to #3178c6
- Configure ace_mode as typescript and codemirror_mode as javascript
- Add license information for ArkTS submodule
- Update grammars.yml and .gitmodules with proper alphabetical sorting
@Groupguanfang Groupguanfang requested a review from a team as a code owner January 9, 2026 08:02
@Groupguanfang Groupguanfang mentioned this pull request Jan 9, 2026
18 tasks
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still looks like you've not used the script/add-grammar script to add the grammar. Please use that script and don't do it manually. You can use a Codespace (see the CONTRIBUTING.md file) if you're struggling in your own environment.

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.

2 participants