-
-
Notifications
You must be signed in to change notification settings - Fork 427
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] GDScript Code Highlighting Support #3222
Comments
Sure, go on! Create a pull request! 👍️ |
Awesome, I will do so after work, within 12 hours from now. |
…script_highlighting Add GDScript Language Data for Markdown Highlighting.
Pulled data from the following pages from the Godot documentation: [All Classes](https://docs.godotengine.org/en/stable/classes/index.html) [@GDscript](https://docs.godotengine.org/en/stable/classes/class_%40gdscript.html) [@globalscope](https://docs.godotengine.org/en/stable/classes/class_%40globalscope.html) [GDScript reference](https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html)
Pulled data from the following pages from the Godot documentation: [All Classes](https://docs.godotengine.org/en/stable/classes/index.html) [@GDscript](https://docs.godotengine.org/en/stable/classes/class_%40gdscript.html) [@globalscope](https://docs.godotengine.org/en/stable/classes/class_%40globalscope.html) [GDScript reference](https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html) Signed-off-by: Patrizio Bekerle <[email protected]>
Signed-off-by: Patrizio Bekerle <[email protected]>
There now is a new release, could you please test it and report if it works for you? |
Sure thing! Pulling from the release branch to get version 25.2.0, then building and running it through Qt Creator. Everything seems to work as intended. Some nitpicks, but not dealbreakers. How it is supposed to be highlighted below through the Godot VSCode extension: How the current implementation highlights these same lines: These are nitpicks though, and not even the GitHub markdown support does this. But, I'm sure this is an easy fix for anyone who wants to adjust some things. I use the FlatPak version of QOwnNotes (through FlatHub), and I'll be making use of this feature somewhat frequently. |
Great, thank you for testing!
What was the difference that was relevant for you? |
Thank you, The difference that is relevant for me is the following: Both In the Godot game engine, everything within a scene is organized into a tree of "Nodes" that you can then reference in GDScript using these constructs. A common example: say we have a scene with three nodes:
If we were to attach a script to the root node, then wanted to reference its child node If we were to then try to reference the Say the NodePath above is deemed to long. Some scenes will have modules nested deep within their node tree that we want the root node to reference. We can then use a If we were to assign the |
Is there anything you can change in the highlighting? |
I should be able to work on it by next weekend, as I've just been busy lately (currently at work, away from home). I never coded in C++, let alone used Qt Creator before so I've used this as a learning experience over the weekend. Everything I did in my contribution was just from recognizing patterns in the existing code and going from there. I know this problem should be easy as it's a matter of iterating over characters and checking whether or not a space, newline, or period is found. |
That's how we can learn! 😁👍️ |
Signed-off-by: Patrizio Bekerle <[email protected]>
Is your feature request related to a problem? Please describe.
When I use write my notes from game development tutorials, I notice that there is no support for the Godot Engine, which uses GDScript.
Describe the solution you'd like
I'd like to type
gdscript
at the start of a fenced code block to get syntax highlighting for GDScript like we get here on GitHub below.Describe alternatives you've considered
Using another note app or using screenshots from within the engine to paste inside my notes, but this adds friction to my workflow.
Additional context
I've actually already pulled the repository and attempted to implement this feature myself. Here is a screenshot below:
With permission, I can create then push a branch called
feature/gdscript_highlighting
for review.Output from the debug section in the settings dialog
Expand
The text was updated successfully, but these errors were encountered: