Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add <INSERT> Language Syntax Highlighting / Support #306

Open
mayurankv opened this issue Jan 28, 2025 · 0 comments
Open
Assignees
Labels
documentation Improvements or additions to documentation wontfix This will not be worked on

Comments

@mayurankv
Copy link
Owner

Meta Issue outlining the issues with adding language support.

Summary

The only way languages can be added to code blocks in Obsidian is via Codemirror syntax highlighting (modes) for editing view and PrismJS for reading view. To add PrismJS languages you'd have to add upstream support directly to be supported by Obsidian as this isn't exposed to the API. For codemirror, modes can be added manually which you are welcome to submit a PR for (the custom reference blocks have a new mode added modified from basic YAML as an example), however I will be unlikely to be able to implement this (well if at all). You are more likely to be able to get satisfactory results by requesting the feature on the Obsidian forum.

If you are requesting addition of a new language, unless it is an extremely popular language that I can easily implement in code mirror, I will not be able to add syntax highlighting for it. However, if you provide an icon or a display name to be added to a language, then I can add those.

@mayurankv mayurankv added documentation Improvements or additions to documentation wontfix This will not be worked on labels Jan 28, 2025
@mayurankv mayurankv self-assigned this Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant