croft-software 0.2.232

VSCode-style TUI written in Rust
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fix: A launch.json `preLaunchTask` or `postDebugTask` written the way VS Code labels its auto-detected tasks now runs with no tasks.json: `npm: <script>` finds the package.json script (whatever runner the lockfile picks), and each root `tsconfig*.json` is a `tsc: build - <file>` task running `tsc -p <file>` (`tsc -b <file>` when it lists project references; an unusual filename is shell-quoted). A label that names no task suggests the nearest one.
fix: JavaScript/TypeScript debugging: croft now sends js-debug the workspace folder, as VS Code does, so a breakpoint in a compiled TypeScript file (`outDir` plus source maps) is hit in code that runs at startup instead of being skipped with "Program exited without hitting a breakpoint".
fix: Python: Remote Attach (`"request": "attach"` with `connect`, or `host`/`port`) to a process started with `python -m debugpy --listen` or `debugpy.listen()` now works: croft talks to that port directly, as VS Code does, instead of putting its own debugpy adapter in front of it, so breakpoints stop and Pause pauses. The `listen` form of attach still runs croft's adapter.
feature: Files without a byte-order mark can now open in a legacy encoding such as windows-1252, latin1 or Shift_JIS instead of always as UTF-8. croft follows the `.editorconfig` `charset` and a new `files_encoding` setting (VS Code's `files.encoding`, also read from `.vscode/settings.json`), and a status-bar encoding choice is remembered for that file, so it survives closing and reopening the tab (#1432).
fix: Opened at a JS monorepo root whose packages each declare their own vitest or jest (Turborepo, Nx, npm/pnpm workspaces), the Testing view now runs in the focused file's package, or the first package with a runner, instead of saying no test runner was detected.
feature: The Run and Debug panel has VS Code's debug toolbar while a session is live: Continue (Pause while running), Step Over, Step Into, Step Out, Restart and Stop as clickable buttons beside the status, each naming its key on hover, so a session can be stepped where the terminal or desktop takes the F-keys.
feature: Right-click a row in Run and Debug to copy what it holds. A variable offers Copy Value, Copy as Expression and Add to Watch, a watch expression offers Copy Value, Copy Expression and Remove Expression, and a call-stack frame offers Copy Call Stack. Copy Value asks the debug adapter for the whole value, so a long string that VARIABLES cuts at the sidebar edge is copied in full (#1546).
fix: Screen reader mode now reads out each debugger pause (why, file, line and its text) and Continue, and how a finished test run went, with its first failure, whatever has focus.
fix: The Settings editor edits settings that aren't on/off switches. `locale` picks from the installed languages, a number such as `terminal_rewind_mb` takes a typed number (an empty entry puts it back to the default), and `code_scanning` steps through off, on and prompt. A value the setting can't hold is refused with the reason, and a list such as `files_exclude` opens its config file at that key. Unset settings show "(default)" instead of `null`.
fix: Replace in File (Ctrl+Alt+F) now starts in the Find field when the caret is merely in a word, with that word selected so typing replaces it. It starts in the Replace field only when the find text came from a one-line selection or the find bar was already open, so typing the search text and then the replacement no longer swaps them.
fix: Hot exit now backs up unsaved edits in the CSV, TSV and xlsx grid, so cells edited before the terminal closed or croft was killed come back, unsaved, on the next launch, as edits in a text tab already did.
feature: The command palette has rust-analyzer's own commands while it serves the active file: Rust: Expand Macro Recursively at Caret (opens the expansion in a Rust tab), Locate Parent Module, Open Cargo.toml, Rebuild Proc Macros and Build Scripts, and Reload Workspace.
fix: Snippets scoped to `javascriptreact` (VS Code's id for `.jsx`, and what `croft import-vscode` writes for `javascriptreact.json`) now expand in `.jsx` files, and `jsonc` ones in `.jsonc` files. Snippets scoped to `javascript` or `json` still apply there too.
feature: New `insert_final_newline`, `trim_trailing_whitespace` and `trim_final_newlines` settings (VS Code's `files.*` equivalents, imported from them) clean up every save without needing a `.editorconfig`; a `.editorconfig` value still wins for its files.
fix: A test of the editor's bracket colours on a long line no longer fails on a busy machine.