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

Auto-Completion (experimental) #606

Closed
zhhwss opened this issue Apr 4, 2017 · 15 comments
Closed

Auto-Completion (experimental) #606

zhhwss opened this issue Apr 4, 2017 · 15 comments
Labels
fixed Check the Milestone for the release in which the fix is or will be available. Language Service

Comments

@zhhwss
Copy link

zhhwss commented Apr 4, 2017

There are no automatic code hints for variables that have already appeared in the current file。

@bobbrow
Copy link
Member

bobbrow commented Apr 4, 2017

Our extension currently disables editor.quickSuggestions when the C_Cpp.autocomplete setting is enabled (which is the default). You should be getting automatic suggestions when you type certain operators (".", "->", "::") but our suggestion list is currently incomplete and caused users to have to 'escape' the suggestions to type keywords, so we disabled it temporarily for the case you mention.

@rdlaner
Copy link

rdlaner commented Apr 26, 2017

I just started using this extension and also noticed that intellisense does not automatically give suggestions when I start typing. I either have to use "ctrl+space" or encounter one of the specified operations (".", "->",...).
Is there any plan to support auto suggestions that trigger when typing?

@bobbrow
Copy link
Member

bobbrow commented Apr 26, 2017

As I mentioned above, yes, we do plan to remove the temporary disabling of this setting. soon.

@fxliang
Copy link

fxliang commented Apr 28, 2017

is it possible to disable the completion triggered by . :: ->,when it's not OK to suggest the correct members of those, I used ycmd to make that work. if it's possible to disable completion triggered by those characters, it would be much better for me .

@sean-mcmanus
Copy link
Contributor

@fxliang The only way to disable the . :: -> autocomplete is to change the C_Cpp.autocomplete setting to "Disabled". Are you asking for an additional setting that enables our autocomplete when Ctrl+Space is used, but disables the popup at . :: ->?

@fxliang
Copy link

fxliang commented Apr 28, 2017

@sean-mcmanus
with editor.quickSuggestions it completes words in current file only , when cpptools helps to complete words in directory. However cpptools couldn't complete members in structure etc at .::->when with only ycmd(no cpptools) it does well. What I want to know is if it's possible to used cpptools complete words when not at .::->, at .::-> let ycmd do that art of completions.

Sorry for my chinglish :(

@fxliang
Copy link

fxliang commented Apr 28, 2017

@sean-mcmanus yes, disable the popup at .::->.

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Apr 28, 2017

@fxliang We could enable disabling of the popup, but I don't know if the other autocomplete provider would kick in, because we're still registered as a general completion provider (such as when Ctrl+Space is used). How do you use ycmd? From the you-complete-me extension? If our tool is missing results when . :: -> are used then that is a bug we should fix (we have some known bugs), and we're also working on IntelliSense engine autocomplete which will give better results.

@fxliang
Copy link

fxliang commented Apr 28, 2017

@sean-mcmanus yes , I am using you-complete-me.

@sean-mcmanus sean-mcmanus added fixed Check the Milestone for the release in which the fix is or will be available. and removed fixed Check the Milestone for the release in which the fix is or will be available. labels May 4, 2017
@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented May 9, 2017

@fxliang We're working to add more accurate IntelliSense-based autocomplete when trigger characters are used, so we don't believe a setting to disable it will be needed. For the next update, we're just removing the automatic setting of quickSuggestions to false (the original issue).

@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label May 9, 2017
@Srekel
Copy link

Srekel commented May 19, 2017

Will these issues be resolved when the new C++ extension release is... released? :)
microsoft/vscode#26938
microsoft/vscode#26939

Plus, I would really like to be able to disable all of the suggestions for functions and types in the Windows SDK (and more). I'm very un-interested in them for this project.

Direct gif of buggy behaviour:

autocompletebug

@bobbrow
Copy link
Member

bobbrow commented May 19, 2017

@Srekel, the behavior you demonstrate in the gif is currently the expected behavior. The tag parser does not scan local variables or collapse duplicates into a single item in the suggestion list. The issues you list will be addressed when autocomplete suggestions are provided by the new IntelliSense engine.

@Srekel
Copy link

Srekel commented May 19, 2017

New intellisense engine - is that something that's coming in VS Code or an upcoming feature in this extension?

Regarding my request to disable suggestions coming from "outside" the project, is that on the roadmap? Or is it something I can already do?

Thanks for the reply!

@bobbrow
Copy link
Member

bobbrow commented May 19, 2017

The new IntelliSense engine is a feature of this extension. It currently replaces the tag parser for quick info tooltips but is being updated to provide more features, such as autocomplete.

The Windows SDK is included by default on Windows. If you open the command palette (CTL+SHIFT+P) and select "C/Cpp: Edit Configurations" a file called c_cpp_properties.json will be created and you can remove the paths you don't want to have included in your project.

You may need to delete the old DB to remove the extra symbols - I don't think we've published a fix for that issue yet. On Windows, the DB should be under %appdata%\Code\User\workspaceStorage\<hash>\ms-vscode.cpptools. Or you can just change the browse.databaseFilename property in the c_cpp_properties.json file to create a new one.

@bobbrow
Copy link
Member

bobbrow commented May 23, 2017

This was fixed in version 0.11.1. Please reopen if you continue to have this issue.

@bobbrow bobbrow closed this as completed May 23, 2017
@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.
Labels
fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

6 participants