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
A components plugin that makes it easy to selectively add external scripts to the project
Describe the problem or limitation you are having in your project
I made a quick preview popup that shows source code before you add a script to the project but it doesn't have syntax highlighting (and it would help if it did):
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A reference to GDScript syntax highlighter that can be used in TextEdit.syntax_highlighter
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Could be a static property on EditorSyntaxHighlighter or maybe a method on the EditorInterface to get it, or just the class itself instead of an instance. I'm not sure tbh, maybe knowing how it works internally will help deciding
If this enhancement will not be used often, can it be worked around with a few lines of script?
EditorInterface.get_script_editor().get_current_editor().get_base_editor().syntax_highlighter but it relies on some script being opened in the script editor. I thought about opening some dummy script but as far as I can tell there's no way to do it when using external editor. Even if it was possible it's way too hacky
Is there a reason why this should be core and not an add-on in the asset library?
Unavailable to addons
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
A components plugin that makes it easy to selectively add external scripts to the project
Describe the problem or limitation you are having in your project
I made a quick preview popup that shows source code before you add a script to the project but it doesn't have syntax highlighting (and it would help if it did):
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A reference to GDScript syntax highlighter that can be used in
TextEdit.syntax_highlighter
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Could be a static property on
EditorSyntaxHighlighter
or maybe a method on theEditorInterface
to get it, or just the class itself instead of an instance. I'm not sure tbh, maybe knowing how it works internally will help decidingIf this enhancement will not be used often, can it be worked around with a few lines of script?
EditorInterface.get_script_editor().get_current_editor().get_base_editor().syntax_highlighter
but it relies on some script being opened in the script editor. I thought about opening some dummy script but as far as I can tell there's no way to do it when using external editor. Even if it was possible it's way too hackyIs there a reason why this should be core and not an add-on in the asset library?
Unavailable to addons
The text was updated successfully, but these errors were encountered: