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

[C/C++ extension] code auto-completion issues for local variables and function parameters #624

Closed
prophett0527 opened this issue Apr 10, 2017 · 2 comments

Comments

@prophett0527
Copy link

static void test_function(int test_param)
{
int abc_test = test_param;
}

For this test code,
when "int abc_test = test" is entered, possible methods and definition in the entire project is listed, but the parameter "test_param" is NOT displayed.
However, when "int abc_test = test_p" is entered, the suggestion list is disappeared. At this point, if "ctrl + space" is pressed, "test_param" is listed as code-completion suggestion.

Local variables and function parameters are NOT listed as code-completion at first time. They are listed ONLY when no motheds and functions are matching with the input in the entire project.

If I remember correctly, Visual Studio is displaying local variables and methods and functions all-together at the same time.
Is is possible to list all variables and methods together at the same time in VSCode?

@prophett0527
Copy link
Author

prophett0527 commented Apr 10, 2017

My environment is Windows 7 + VSCode 1.11.1

@sean-mcmanus
Copy link
Collaborator

Our auto-complete currently doesn't work for local variables and the completion for test_param is actually when we find no results and fall back to VS Code's default textmate word completion. We intend to make this better (see #13 ). VS Code doesn't seem to allow multiple auto-complete providers to accumulate results. You can disable ours via the C_Cpp.autocomplete setting.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants