DSH CodeCraft
A precise, safe CodeMirror 6 editor inside DSH's native file tabs.
English · 简体中文 · Documentation
Status: v0.1.1 has passed automated validation. Real DSH Desktop regression testing is still required before release.
Features
- Uses DSH's native workspace explorer and file tabs.
- Provides syntax highlighting, line numbers, folding, search, line comments, indentation, undo/redo, and basic completion.
- Saves with
Cmd+Son macOS orCtrl+Son Windows and reports dirty, saving, saved, failed, and read-only states. - Detects external changes and refuses stale writes.
- Restores unsaved drafts after tab switches, tab closure, or page reloads.
- Preserves LF/CRLF, UTF-8 BOM, and POSIX file mode where supported.
- Safely rejects files that are too large, binary, non-UTF-8, mixed-line-ending, or otherwise unsafe to edit.
- Performs editing locally without model calls, telemetry, or file uploads.
Requirements
| Component | Supported |
|---|---|
| Operating system | macOS or Windows |
| DSH Desktop | 0.2.1-rc.5 |
| Node.js | 20 or later when building from source |
Install
Install from npm
dsh plugin --profile desktop add dsh-codecraft@latest
Restart DSH Desktop after installation.
Install from source
git clone https://github.com/lllirunze/dsh-codecraft.git
cd dsh-codecraft
npm install
npm run check
dsh plugin --profile desktop add "$PWD"
Restart DSH Desktop after installation. The plugin manifest automatically adds CodeCraft to the selected DSH profile; no manual profile editing is required.
Update
Update an npm installation to the latest published version:
dsh plugin --profile desktop update --latest dsh-codecraft
Alternatively, installing an explicit version replaces the currently selected version:
dsh plugin --profile desktop add dsh-codecraft@0.1.1
Restart DSH Desktop after updating.
For a local source installation, pull the new source, rebuild it, and refresh the profile dependency:
git pull
npm install
npm run check
dsh plugin --profile desktop add "$PWD"
CodeCraft does not currently provide in-app update notifications or automatic background updates. Installation and updates are managed by the DSH CLI.
Uninstall
dsh plugin --profile desktop remove dsh-codecraft
Restart DSH Desktop. Native file previews are restored automatically.
Usage
- Open a supported source or text file from DSH's workspace explorer.
- DSH opens its native file tab and selects the CodeCraft renderer.
- Edit the file and press
Cmd+Son macOS orCtrl+Son Windows, or use the Save action in the status bar. - Use the viewer menu above the tab to switch to DSH's native Code or Plain Text preview when needed.
Keyboard shortcuts
| macOS | Windows | Action |
|---|---|---|
Cmd+S |
Ctrl+S |
Save the current file |
Cmd+F |
Ctrl+F |
Search within the file |
Cmd+/ |
Ctrl+/ |
Toggle line comments |
Cmd+Z / Cmd+Shift+Z |
Ctrl+Z / Ctrl+Y |
Undo / redo |
Tab / Shift+Tab |
Tab / Shift+Tab |
Indent / outdent |
Ctrl+Space |
Ctrl+Space |
Open basic completion |
Documentation
Limitations
- CodeCraft supports UTF-8 source and text files up to 2 MiB.
- Symbolic links are read-only.
- There is no LSP, semantic diagnostics, automatic import, or go-to-definition support.
- Linux has not been validated and is not currently supported.
- There is no cross-window draft synchronization.
License
MIT. See LICENSE.
No comments yet. Be the first to write one.