topmark.filetypes.detectors package index¶
topmark / filetypes / detectors
Content-based file type detectors.
This package hosts lightweight, side-effect-free probes that inspect file content to disambiguate formats that share extensions (e.g., JSON vs JSONC).
Typical usage is to reference detector callables from a FileType via a
content_matcher and restrict invocation with a content_gate (e.g.,
IF_EXTENSION) to keep detection fast.
Submodules
jsonc: Heuristic JSON-with-comments detection.
Notes
Detectors should be fast and read only a small prefix of the file. Avoid importing heavy dependencies here to keep CLI startup time low.
Immediate children in this package¶
- topmark.filetypes.detectors.jsonc
- Detectors for JSON-with-comments (JSONC/CJSON).