-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Enabling type hints in editor adds extra bracket #323
Comments
@boruok Which Godot version and VS Code extension version are you using? |
I can confirm with: The issue seems to originate on Godot itself, since the extension receives this message from the LSP server: {
"id": 112,
"jsonrpc": "2.0",
"result": {
"command": {
"command": "",
"title": ""
},
"data": {
"context": null,
"position": {
"character": 6,
"line": 12
},
"textDocument": {
"uri": "file:///media/raulsntos/Data/GodotProjects/vscode-test/Main.gd"
}
},
"deprecated": false,
"detail": "",
"documentation": {
"kind": "markdown",
"value": "\tfunc Object._set(property: String, value: Variant) -> bool\n\nVirtual method which can be overridden to customize the return value of `set`.\n\nSets a property. Returns `true` if the `property` exists.\n\n"
},
"filterText": "",
"insertText": "_set(property: String, value) -> bool:(",
"kind": 2,
"label": "_set(property: String, value) -> bool:",
"preselect": false,
"sortText": ""
}
} Notice the property The code responsible is: https://github.com/godotengine/godot/blob/4dc8214831d1617e7f5f06e8294fb37ea23dae59/modules/gdscript/language_server/gdscript_text_document.cpp#L287-L291 (affects both Godot adds the closing parenthesis when the label doesn't end with _set(property, value): But doesn't work when using type hints since the label no longer ends with _set(property: String, value) -> bool: |
@Calinou |
Issue description
Steps to reproduce
The text was updated successfully, but these errors were encountered: