The Custom Syntax Highlights plugin enables syntax highlighting for files with non-standard extensions by mapping them to a chosen language. Users can configure extension-to-language mappings through settings, allowing files like .bib, .tex, or .py to be rendered as readable, colour-coded code blocks in reading view. The plugin ensures these files open directly in reading mode, offering a clean, formatted display ideal for reviewing source files without editing. It also includes an option to disable highlighting for certain extensions by mapping them to markdown. Markdown files themselves are excluded since they are already handled natively. The plugin draws inspiration from earlier work on custom file extensions but expands its functionality significantly.
Changed
- Moved configuration-related files into
config/directory for cleaner project root. - Updated import paths in source code to reflect new configuration file locations.
Fixed
- Plugin Review: Scoped plugin CSS to prevent conflicts with core Obsidian styles.
- Plugin Review: Replaced unsafe type casts with
instanceofchecks for improved stability.