Skip to content

Add inlay hints to the script editor #12863

@nubels

Description

@nubels

Describe the project you are working on

A 3D multiplayer game.

Describe the problem or limitation you are having in your project

Sometimes, when you take a glance at your code, it can be hard to tell what each argument does. This is particularly true for functions with many parameters.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Implement inlay hints that work similarly to those in JetBrains IDEs because they provide additional information, making it easier to understand code at a glance. With inlay hints, you don't necessarily need to look at the documentation or the implementation of a function to understand the purpose of each argument.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

This is how inlay hints work in JetBrains IDEs. I think parameter names are the most important inlay hints, though usages could be helpful, too, especially because methods can be called from outside of script files through the AnimationPlayer for example.

Image

There should also be an option in the editor settings to adjust the behavior of inlay hints. Some users may want to disable them entirely.

Image

If this enhancement will not be used often, can it be worked around with a few lines of script?

No, I don't think so.

Is there a reason why this should be core and not an add-on in the asset library?

This is about improving the usability of the script editor.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions