ohosvscode/arkTS
About
🧩 VSCode HarmonyOS ArkTS plugin for personal use ✨✍️ supports various completions and navigation ⛺️ supports codelinter to detect errors
Developer ToolsMeasured star growth
- in 24h
- +1
- in 7 days
- +3
- in 15 days
- +2
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README-en.md
OriginalA QQ group has been created. Feel free to join for learning and discussion (Group ID: 746153004)
This is an ArkTS VSCode extension developed based on Volar. 🌹 It appears that there has been no proper support for ArkTS in VSCode until now. Most of the existing ArkTS extensions in the VSCode marketplace are very basic, so I decided to write one myself.
Features
- 🌹 Complete basic syntax highlighting, completion, jump, and diagnostic features for
ArkTSlanguage (1.x) - 🎨 ArkTS supports right-click one-key quick formatting, formatting supported by
oxktoolchain, toolchain written inRust, forked fromoxc projectproject, extremely fast ⚡️ Demo repository address: https://github.com/ohos-rs/oxc-ark Thanks to GitHub @richerfu for his contribution! (1.2.12+) - 💿 Support the same as
DevEco Studioemulator image manager, support creating/deleting devices and downloading/deleting emulator images, provided by @arkts/image-manager ✊ (1.3.0+) - 🚀 Support task
tasks.jsonand launch configurationlaunch.json, after configuration, you can run hvigor tasks compile project, and run or debug to emulator/real device throughhdccommand (1.3.0+) - 📦 Support installation and management of
OpenHarmony SDK, and automatically detect theAPI versionof the currently opened project, show popup prompts fordownloadorswitch(1.x) - ✂️ Support the same as
TypeScriptbasicsnippets, and addStruct Declarationand otherArkTSuniqueSnippets - 🥇 Perfect
$rfunction completion and jump, supportmodule.json5file completion and jump, support global reference query for alljsonfiles underresources/element/; supported by @arkts/project-detector hvigor project analyzer ✊ (1.1.6+) - 🍞 Support
module.json5file path completion and jump, reference expression error diagnosis,requestPermissionspermission completion and other new features ✨ (1.1.8+) - 🌾 hvigor resource explorer panel, support resource qualifier folder creation, resource reference indexing and other functions (based on
@arkts/project-detectorproject analyzer) (1.2.10+) - 🎨 Built-in file icon theme: provide
ArkTS Iconstheme, supporting ArkTS file types (.ets,.json5, etc.) and common web project files (JavaScript, React, CSS, Markdown, etc.), perfect for Nx monorepos and mixed projects. - 🖊️ Comprehensive JSON Schema support. Supports the following JSON Schema files:
build-profile.json5Module-level/Project-level configurationoh-package.json5Module-level/Project-level configurationcode-linter.json5Module-level/Project-level configuration- All
color.jsonfiles underresources/element/for kv value configuration module.json5file configurationmock-config.json5file configurationhvigor-config.json5file configurationmain_pages.json5file configurationAppScope/app.json5file configuration- ...will support more JSON Schema files in the future

Extension Installation 📦
- Marketplace installation: https://marketplace.visualstudio.com/items?itemName=NailyZero.vscode-naily-ets
- Open VSX installation: https://open-vsx.org/extension/NailyZero/vscode-naily-ets
Or simply search for ArkTS Support in VSCode.
Usage Guide 📖
Please refer to Arkcode Organization Documentation.
VSCode File Icon Theme 🖼️
Built-in ArkTS Icons Theme
This extension includes the ArkTS Icons file icon theme, providing comprehensive support for ArkTS and web development files:
Supported File Types:
- ArkTS Files:
.ets,.hml,.json5config files - Web Development: JavaScript (
.js,.jsx), TypeScript (.ts,.tsx), React - Styling: CSS, SCSS, SASS, LESS, HTML
- Documentation: Markdown (
.md,.mdx), text files - Config Files:
.gitignore,.env,.eslintrc,package.json,next.config.js, etc. - Common Folders:
node_modules,src,components,pages,app, etc.
How to Enable:
- Open Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) - Type: "Preferences: File Icon Theme"
- Select "ArkTS Icons"
Or set in settings.json:
{
"workbench.iconTheme": "arkts-icons"
}
📖 Full Documentation: ArkTS File Icons Theme Guide
Material Icon Theme (Optional)
You can also use Material Icon Theme. I've submitted a PR to Material Icon Theme, and currently .ets and .d.ets files directly use the TypeScript official file icon pack. This is available in versions after upgrading to v5.22.0 👇
![]()
PR address: https://github.com/material-extensions/vscode-material-icon-theme/pull/2966
Configuration
| Key | Description | Type | Default |
|---|---|---|---|
ets.sdkPath |
OpenHarmony SDK path. The ETS Language Server will be restarted when this setting is changed. (This path corresponds to the sdk/default/openharmony path in the DevEco Studio installation directory) |
string |
"" |
ets.baseSdkPath |
The default OpenHarmony SDK base path. All versions of SDKs will be installed under this path. (This path corresponds to the OpenHarmony SDK location in DevEco Studio settings) | string |
"${os.homedir}/OpenHarmony" |
ets.hmsPath |
The path to the HMS SDK path. Because HMS SDK is independent of OpenHarmony SDK, it needs to be set separately. Generally, you can find the SDK in the DevEco Studio installation directory. (This path corresponds to the sdk/default/harmony path in the DevEco Studio installation directory) |
string |
"" |
ets.lspDebugMode |
Enable ETS Language Server debug logging. | boolean |
false |
ets.ignoreWorkspaceLocalPropertiesFile |
Ignore auto infer the base SDK path from local.properties file in the local workspace. |
boolean |
false |
ets.linterVersion |
The version of the ArkTS linter to use. Set to 'off' to disable the linter. | string |
"1.1" |
ets.resourceReferenceDiagnostic |
未匹配到的 $r() 资源引用的诊断级别 | string |
"error" |
ets.localImagePath |
The path of the local image folder. The local image folder is used to store the images of the devices. |
In MacOS, the default path is ~/Library/Huawei/Sdk; in Windows, the default path is %APPDATA%\Local\Huawei\Sdk. | string | `` |
| ets.imageConfigPath | The path to store the HarmonyOS configuration files.
In macOS, it will be ~/Library/Application Support/Huawei/DevEcoStudio6.0 by default; In Windows, it will be %APPDATA%\Roaming\Huawei\DevEcoStudio6.0 by default; In other platforms, it will be ~/.huawei/DevEcoStudio6.0 by default. | string | `` |
| ets.deployedEmulatorPath | The path to store the deployed devices.
In Windows, the default path is %APPDATA%\Local\Huawei\Emulator\deployed; In other platforms, the default path is ~/.huawei/Emulator/deployed. | string | `` |
| ets.emulatorLogPath | The path to store the emulator log files.
In macOS, the default path is ~/Library/Logs/Huawei/DevEcoStudio6.0; in Windows, the default path is %APPDATA%\Local\Huawei\DevEcoStudio6.0\log; in other platforms, the default path is ~/.huawei/DevEcoStudio6.0/log. | string | `` |
Commands
| Command | Title |
|---|---|
ets.restartServer |
ETS: Restart ETS Language Server |
ets.installSDK |
ETS: Install/Switch OpenHarmony SDK |
ets.createProject |
ETS: Create ArkTS Project |
ets.resourceExplorer.refresh |
ETS: Refresh Hvigor Resource Explorer |
ets.resourceExplorer.openFile |
ETS: Open File in Editor |
ets.resourceExplorer.openResourceQualifierEditor |
ETS: Open Resource Qualifier Editor |
ets.openDeviceManager |
ETS: Open Device Manager |
ets.copyHdcPathToClipboard |
ETS: Copy HDC Path |
Star History 🌟
Contact to Author 📧
Coffee ☕️
If this project helps you, consider buying the author a coffee ☕️
You can also join the QQ group for further discussions (Group ID: 746153004)
License 📝
Explore related projects
Loading…