Skip to content
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

Connect signal method adds parentheses #184

Closed
TheColorRed opened this issue Jun 2, 2020 · 4 comments · Fixed by godotengine/godot#59482
Closed

Connect signal method adds parentheses #184

TheColorRed opened this issue Jun 2, 2020 · 4 comments · Fixed by godotengine/godot#59482
Labels
bug language server Issue is not originating from this extension, but from the LSP instead

Comments

@TheColorRed
Copy link

When connecting a signal, the third parameter of connect, adds an opening parentheses which then needs to be deleted.

Expected Output:

connect('my_signal', self, '_on_signal')

Actual Output:

connect('my_signal', self, '_on_signal(')

Additional Parentheses

@TheColorRed
Copy link
Author

Not sure if this is related or not, but it would be nice if the functions would automatically add the closing ).

@grenappels
Copy link

autocomplete_one_paren
hints also do not pop up unless i delete the extra ( and re-add it

@mickdekkers
Copy link

This looks related to #142, though there it also adds extra double quotes

mickdekkers added a commit to mickdekkers/godot that referenced this issue Sep 27, 2020
So far this fixes the `(` being inserted in godotengine/godot-vscode-plugin#142
and also the extra quotes, but only if completion is
trigged by the quote key.

It does not yet fix godotengine/godot-vscode-plugin#184
because the third param to `connect()` actually is a method.
We need more context to be able to determine whether or not to add parentheses.
@Calinou Calinou added the language server Issue is not originating from this extension, but from the LSP instead label Jun 16, 2022
@Calinou
Copy link
Member

Calinou commented Jun 16, 2022

Note: The bug is in the language server, so you'll need to update to Godot 3.5 once it's released to fix this issue locally. The extension's version does not matter here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug language server Issue is not originating from this extension, but from the LSP instead
Projects
None yet
4 participants