Plugins

Text Quick Viewer

Provides syntax-highlighted previews for text and source code files.

Version 1.0.5 Official plugin Released 123 downloads

Install it from Commander: Plugins → Manage, or drop the signed bundle into the plugins/ directory.

What this bundle provides

One download, 1 plugin.

Text Quick Viewer

dev.nuclr.plugin.core.quickviewer.text

Syntax-highlighted quick viewer for text and source code files.

QuickView Apache-2.0

About

⚡ Text Quick Viewer

Syntax-highlighted instant previews for text and source files inside Nuclr Commander.

No tab switching. No app hopping. Just hit Ctrl+Q and get the file in front of you, fast. 😎

Text Quick Viewer screenshot

🚀 What It Does

  • 🔥 Syntax highlighting for 50+ languages and formats via RSyntaxTextArea
  • 🧭 Line numbers for quick scanning and reference
  • 🪄 Code folding where the language supports it
  • 🌑 Dark styling that fits Commander without looking bolted on
  • 🛡️ Large-file guard that stops previews over 10 MB from freezing the UI
  • 🧪 Binary-file detection that quietly skips files that should not be rendered as text
  • 📦 NIO.2 support, including files inside ZIP and JAR archives
  • ⛔ Cancellation-aware loading so switching files does not leave stale content behind

🎯 Supported File Types

CategoryExtensions
Plain texttxt, log, csv, md
Webhtml, htm, css, js, mjs, ts, tsx, jsp
Data / configjson, yaml, yml, toml, ini, conf, cfg, properties, prefs, pref
JVMjava, kt, scala, groovy, gradle
Systemsc, cpp, h, hpp, cs, go, rs
Scriptingpy, rb, php, lua, perl, pl, dart, sql
Shell / scriptssh, bash, bat, cmd, ps1
XML / markupxml, svg, html, htm, jsp, csproj, classpath, project, factorypath
IDE / projectvsconfig, firebaserc
Extensionless namesLICENSE, WHATSNEW, Dockerfile, mvnw, .gitignore, .gitattributes, .meta

Files that match none of the above are still previewed when they look like text: the first 8 KB is decoded as UTF-8 and accepted only if it has no NUL bytes, matches no known binary signature, is at least 85 % printable, and is no more than 60 % whitespace. A #! shebang also qualifies a file, which is how extensionless scripts preview correctly.

🖼️ Thumbnail

The head of the file (16 KB) as a page of monospaced text; binary content has no thumbnail. At icon sizes the lines are drawn as grey bars, the way a document preview looks.

It implements the platform SDK 6.0.0 thumbnail methods, so plugins that want a picture of a file - attachment chips in AI Projects, for one - get it through Commander.

📥 Installation

Copy the signed plugin archive and detached signature into the Nuclr Commander plugins/ directory:

quick-view-text-<version>.zip
quick-view-text-<version>.zip.sig

Nuclr Commander verifies the RSA-SHA256 signature against nuclr-cert.pem on load. The plugin becomes available immediately without a restart.

🧠 How It Works

TextQuickViewProvider  → decides whether a file looks like supported text
TextFileSupport        → extension/filename tables, binary + UTF-8 heuristics, syntax mapping
TextQuickViewPanel     → loads content and renders it in RSyntaxTextArea

Loading flow

  1. supports(resource) matches the filename or extension; anything unknown falls through to the 8 KB text heuristic in TextFileSupport.
  2. openResource(resource, cancelled) delegates to TextQuickViewPanel.load(...) on a virtual thread.
  3. Loading performs:
    • file-size guard (10 MB limit)
    • binary scan of the first 8 KB
    • content read via Path or InputStream
    • EDT handoff for final UI update
  4. setText(...) selects the syntax style (by extension, or by filename for things like Dockerfile) and swaps in a fresh document.

Threading model

  • EDT: Swing updates, document swaps, repainting
  • Virtual thread: file I/O and binary detection
  • AtomicBoolean cancelled: prevents stale UI updates when the user changes selection mid-load

🗂️ Source Layout

src/main/java/dev/nuclr/plugin/core/quick/viewer/text/
├── TextQuickViewProvider.java   plugin entry point
├── TextFileSupport.java         format detection, binary/text heuristics, syntax mapping
└── TextQuickViewPanel.java      Swing panel, loading, syntax highlighting

Unit tests for the detection heuristics live in src/test/java/.../TextFileSupportTest.java.

📚 Dependencies

LibraryVersionPurpose
dev.nuclr:platform-sdk6.0.0Nuclr platform interfaces
rsyntaxtextarea3.6.1Syntax-highlighted text rendering

📄 License

Apache 2.0. See LICENSE.

Releases

Version Released Size Download
1.0.5 1.2 MB Download
1.0.4 1.2 MB Download
1.0.3 1.2 MB Download
1.0.2 1.2 MB Download
1.0.1 1.2 MB Download
1.0.0 1.2 MB Download

Details

Plugin ID
dev.nuclr.plugin.core.quickviewer.text
Repository
nuclrdev/plugin-quick-viewer-text
Platform SDK
6.0.0
SHA-256
bc9fd21151b1966b4c34479be3bbcdec5156b6d5b2fbbfd10a7fad38015aaac5