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
Autocomplete should insert parenthesis for methods #1021
Comments
Not sure I agree with this as the default behavior, in JS and more functional languages in particular it is quite common to use functions as references such as passing them in as arguments. Something like this could irritate developers when they're used to typing var func = function (a, b) { /*...*/ }
if (func) {
someFunction(func);
someOtherFunction(func.bind(null, x, y));
} Do you know any editors/IDEs that use this as the default? |
Calling methods is common than passing them as arguments. Many IDEs like WebStorm, IntelliJ Idea and Android Studio use this as default behaviour and it really helps in coding faster. I understand that this could irritate developers who are accustomed to typing parenthesis but for other developers who come from the JetBrains world, it becomes an extra effort. A simple option to enable this behaviour in settings would really help. |
After using Cloud9 IDE online and then switching to Visual Studio Code for offline work makes you realise the importance of this feature. Will it be available in the future? |
Totally agree on @xeoneux 👍 . If one just wants the identifier, it is just one backspace away. I have been quite annoyed by this also. It seems like the autocomplete suggests me a variable and not a function or method. |
We have experimented with different options in the past. Currently we defer it to the language service. |
for TypeScript this should still be supported with the |
|
For C# there is open issue for now dotnet/roslyn#12363 |
During autocompletion for methods, parenthesis do not get inserted automatically. Most of the time they are required and it's easier to delete them than insert them manually.
Eg: Tab or Return after
var arr = str.sp
should autocomplete tovar arr = str.splice()
rather thanvar arr = str.splice
with the cursor between the parenthesis.The text was updated successfully, but these errors were encountered: