You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: