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

Suggest #include for completion items #530

Open
kkoomen opened this issue Nov 25, 2019 · 1 comment
Open

Suggest #include for completion items #530

kkoomen opened this issue Nov 25, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@kkoomen
Copy link

kkoomen commented Nov 25, 2019

The README homepage from coc.nvim shows a small demo for TypeScript where it automatically adds an include when a specific function is written and the import is missing.

I'm currently using coc.nvim ccls. Is there a way that if I write printf("Hello world!"); it will automatically add #include <stdio.h> to the top of the file? Would like to see this.

@kkoomen kkoomen changed the title Auto-include directives for C just like TypeScript? Auto-include directives for C? Nov 25, 2019
@MaskRay MaskRay added the enhancement New feature or request label Nov 29, 2019
@MaskRay MaskRay changed the title Auto-include directives for C? Suggest #include for completion items Oct 12, 2020
@briancarbone
Copy link

briancarbone commented Aug 30, 2024

I suppose this isn't implemented yet. In Vim, it would be quite helpful for <c-y> to insert the missing #include for the selected completion item. LSP supports the feature, but ccls doesn't seem to communicate the edit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants