Описание
Ниже — оригинальный текст автора.
DSH CodeCraft
A precise, safe CodeMirror 6 editor inside DSH's native file tabs.
English · 简体中文 · Documentation
Status: v0.5.8 supports CodeCraft-owned UI in Chinese, English, Japanese, Spanish, French, German, Russian, and Brazilian Portuguese on macOS and Windows.
Features
- Integrates with DSH's native workspace explorer and file tabs, including file operations, breadcrumbs, and Material file icons.
- Provides CodeMirror editing with GitHub Default Light/Dark syntax and six-level bracket colors, folding, search, comments, completion, Undo/Redo, and configurable two- or four-space indentation.
- Saves writable changes immediately with conflict checks while preserving line endings, UTF-8 BOM, and supported file modes; unsafe files fall back safely.
- Adds project-aware Python completion, Hover, definition/reference navigation, navigation history, syntax-aware indentation, and Google Style Docstrings through managed Pyright.
- Adds fully local Java completion, snippets, Structured Javadoc, indentation, comments, and folding without requiring a JDK or language server.
- Adds offline HTML completion, diagnostics, Outline, navigation, formatting, Emmet, safe tag/ID rename, and native browser preview.
- Provides persistent per-language settings with always-visible master switches and collapsible Python details.
- Follows the DSH Desktop language setting across eight languages without a separate CodeCraft language preference.
- Keeps editing local, with no model calls, telemetry, or file uploads.
Requirements
| Component | Supported |
|---|---|
| Base editor | macOS or Windows |
| Python Intelligence | macOS or Windows |
| Java editing | macOS or Windows in v0.3.0; no JDK required |
| HTML editing | macOS or Windows in v0.4.2; fully offline |
| DSH Desktop | 0.2.2-rc.3 |
| Node.js | 20 or later when building from source |
Install
Install from npm
sole 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
sole 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:
sole plugin --profile desktop update --latest dsh-codecraft
Alternatively, installing an explicit version replaces the currently selected version:
sole plugin --profile desktop add dsh-codecraft@0.5.8
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
sole 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
sole 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.
- Edit normally in the native tab. Writable changes save immediately through the conflict-checked path; the footer reports read-only, external-change, conflict, or save failures.
- Open Settings → CodeCraft to choose two- or four-space indentation and configure the Python, Java, or HTML assistance switches. Disabling assistance never disables ordinary editing or saving.
- Use the viewer menu above the tab to switch to DSH's native Code or Plain Text preview when needed.
Language-specific highlights:
- Python: bundled Pyright provides completion and Hover. Use
Command+Clickon macOS orCtrl+Clickon Windows for definitions and references; configure interpreter or server paths in the expanded Python settings. - Java:
.javafiles receive local lexical completion and snippets. Type/**above a method or constructor and press Enter to generate Structured Javadoc. - HTML:
.htmland.htmfiles receive offline completion, diagnostics, navigation, formatting, refactoring, and Preview in Browser without a language server or network connection.
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 | Open completion manually |
Documentation
Limitations
- CodeCraft supports UTF-8 source and text files up to 2 MiB.
- Symbolic links are read-only.
- Python signature help, diagnostics, automatic cross-file edits, and refactoring are not included.
- Java semantic completion, diagnostics, navigation, refactoring, and build integration are not included.
- HTML diagnostics and refactoring are intentionally current-document scoped; CSS/JavaScript analysis, cross-file rename, and cross-language project association are not included.
- Linux has not been validated and is not currently supported.
License
MIT. See LICENSE.
История версий
- 0.5.829 нояб. 2026 г. · 647 KB