Gdscript snippets are not highlighted while in source mode or live preview mode

Steps to reproduce

Adding any gdscript snippet, for instsnace:

var stick_input = Vector2(
	Input.get_axis("camera_left", "camera_right"), 
	Input.get_axis("camera_up", "camera_down")

Did you follow the troubleshooting guide?


Expected result

The gdscript is supported by PrismJS so I would expect gdscript to be highlighted both while editing a document and while in reading mode

Actual result

The gdscript snippets are highlighted only when reading the document in reading mode, but not while editing it. This behavior only happens with gdscript, it does not happen with other programming languages


Obsidian version: v1.3.5
Installer version: v1.3.5
Operating system: Windows 10 Pro 10.0.19045
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on


Additional information

Someone else commented about this issue here Reddit - Dive into anything

I think it’s still PrismJS syntax in Reading Mode and CodeMirror syntax highlighting in editing views.

1 Like

Thanks! that would explain it yes since GDScript is not supported by CodeMirror (and it will never be it seems) Please add GDScript support · Issue #6966 · codemirror/codemirror5 · GitHub

I will mark your answer as solution after a couple of days, just in case anybody else wants add something or propose a solution for this.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.