deathau / cm-editor-syntax-highlight-obsidian

A plugin for [Obsidian](https://obsidian.md) which allows syntax highlighting for code blocks in the editor.
486 stars 37 forks source link

Lacks support for GLSL #52

Open N0rdskog opened 1 year ago

N0rdskog commented 1 year ago

Would be much appreciated! This plugin is a godsend otherwise.

Remyuu commented 9 months ago

Here is a simple way can help you.

Go .../.obsidian/plugins/cm-editor-syntax-highlight-obsidian

Find the file main.js

Add the following code at Line 122

 {name: "Glsl", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"]},
image
Remyuu commented 9 months ago

But like vector, matrix types, specific function and variables might not be highlighted correctly...

C renderer

vec3
gl_FragColor
clamp()

Glsl Renderer

vec3
gl_FragColor
clamp()