Skip to content

Language injections support #367

@mazatf2

Description

@mazatf2

They are added with comment:

# language=json
var json = '{"foo": "bar"}'

# language=json
func btn(data: String = "{}"):
    pass

or moving cursor into string and: press [shift][shift] and type "language injections" press [enter]. selection windows opens. type "json"

so they can be used with Rider with C#:

// language=gdscript
string stuff = ""
class_name ${gdName} extends ${gdExtends}

func _ready():
    prints("${gdName}", "${gdExtends}")
""

or with Webstorm with Typescript

// language=tscn
let output = `
[node name="MenuBar" type="MenuBar]
unique_name_in_owner = true
layout_mode = ${mode}
`

references:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions