Skip to content

Code in about 200 languages highlighted in both apps, a built-in viewer on F3 in the terminal app; files with the newly known code endings read again once - #260

Merged
mwo-dk merged 1 commit into
masterfrom
languages
Oct 19, 2026
Merged

mwo-dk merged 1 commit into
masterfrom
languages

Conversation

@mwo-dk

@mwo-dk mwo-dk commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Code in about 200 languages highlighted in both apps, and a built-in viewer on F3 in the terminal app.

  • One language table in coxswain-core (code::language): by name, extension, what the file says where two languages share an extension (.mod Modula-2 vs tracker music, .pro Prolog vs Qt, .v Coq vs Verilog, .s ARM/MIPS/x86, .inc, .m, .pl, .pp, .fs, .bas, .cl), then the #! line. Old languages included: COBOL, Fortran, Pascal, BASIC, assembly, VHDL, Verilog, batch.
  • Desktop app: every highlight.js language, loaded only when a file needs it (a chunk each, in the highlighting worker); COBOL, Zig, Svelte, Terraform/HCL and Solidity grammars added from npm (Apache-2.0/MIT). REXX and PL/I skipped (GPL-3.0), Modula-2 shown with Pascal's grammar, no grammar exists for Clipper/dBase. Guessing stays among the common set.
  • Terminal app: F3 opens a built-in full-screen viewer: highlighted in the theme's colours (one token→slot table shared with the desktop's style sheet), line numbers, wrap, search (/ or F7, n/N), go to line, p hands the file to $PAGER, F4 edits. Large files read lazily (a 50 MB log opens in ~1 ms; lines capped at 1 MB, 20 M lines); End follows a growing or rotated log; pipes and devices refused on the opened handle (O_NONBLOCK, no path re-open). syntect (fancy-regex, pure Rust) + two-face grammars; viewer in config.toml still names another program. RUSTSEC-2025-0141 (bincode, unmaintained, syntect's own grammar dumps) ignored with a reason; licence notices for the grammars added to tools/bom.
  • Encodings: UTF-8, UTF-16 with its BOM, else Windows-1252, in both apps.
  • Search store redo: only files with the newly known code endings (.cob, .for, .bat, .mod, .pro, .inc …) are read again, once, under a reader key of their own (readers.code, PR Make PDF searchable (Alt+P), previews of Typst, PostScript, XPS, D2 and more diagram kinds, old office files and clip art through sealed containers; PostScript and some old office kinds read again once for search #255's mechanism); the readers tag older apps read is unchanged, so they redo nothing.
  • Review fixes included (store tag ping-pong, huge-line and unbounded index memory, FIFO hang/TOCTOU, Windows-1252, encoding label, Edit returning to BOM/provenance, growing logs, Intel-syntax .s, one nearly_utf8, glob without the common grammars, bounded auto-detection).
  • Docs: text-and-code (Languages), view-and-edit (The built-in viewer), every "your pager" mention, FAQ, F1 texts in all languages; pictures: terminal viewer, COBOL preview, index.bin in the viewer.

…er on F3 in the terminal app; files with the newly known code endings read again once
@mwo-dk
mwo-dk enabled auto-merge (squash) October 19, 2026 18:24
@mwo-dk
mwo-dk merged commit 3fadc8b into master Oct 19, 2026
28 checks passed
@mwo-dk
mwo-dk deleted the languages branch October 19, 2026 19:17
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.

1 participant