-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Add built-in GDScript keywords to the class reference #97196
base: master
Are you sure you want to change the base?
Conversation
4a4e255
to
80db886
Compare
I know it's the easiest way to accomplish this, but something about it... It doesn't feel right for Furthermore, because only keywords are documented, the class reference still lacks a general point of reference for literals, operators, or similar. This may be fine, and for the most part we can direct users to the GDScript reference, but it still means that adding just keywords doesn't accomplish the goal of an all-encompassing guide built right inside the editor. |
So I just did a small bit of coding using this, and I'm not a fan of the Ctrl+Click lookup on keywords. In my opinion it adds too much noise when trying to lookup other stuff. Since keywords (especially It might be helpful for beginners, but knowing GDScript it feels more like a downgrade of the script editor to me. Maybe we could prevent the underline highlighting for certain lookup targets 🤔 Edit: Or given that no one will lookup the same keyword that often it might be better to limit the lookup on them to the context menu. |
These are part of `@GDScript` and appear in search results as part of a new `builtin` documentable type. (`keyword` is not used, as `keywords` is already the name of an optional attribute for most documentable types.) Keywords can now be Ctrl + clicked in the script editor to go to their class reference description.
80db886
to
5108913
Compare
I remember when starting writing gdscript I had to check a good few times what was the syntax for |
I think the "noise" can be severely mitigated and the existing behaviour should no longer be an issue. When hovering over keywords, not all occurrences of that keyword should be highlighted. |
These are part of
@GDScript
and appear in search results as part of a newbuiltin
documentable type. (keyword
is not used, askeywords
is already the name of an optional attribute for most documentable types.)Keywords can now be Ctrl + clicked in the script editor to go to their class reference description.
Preview
gdscript_ctrl_click_keyword.mp4
TODO
doc_status.py
to allow tracking progress on builtins.make_rst.py
's reStructuredText generation on the docs website.Filling in the descriptions could be done in a separate PR if we want, like we did for #48548 (where #63870 added the descriptions).
In a future PR, we can look into using a similar approach to document shader keywords in the class reference, in addition to built-ins (which would probably be considered member variables there).