zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.61k stars 2.64k forks source link

[LINUX] C++ autocompletition in C file #14660

Open susandahal opened 1 month ago

susandahal commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Autocompletion related to c++ will be shown in c file during autocompletition.

image

Environment

Zed: v0.143.7 (Zed) OS: Arch Linux Memory: 8 GiB Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log


notpeter commented 1 month ago

Can you share any relevant settings?

SomeoneToIgnore commented 1 month ago

Both C++ and C are backed by clangd and, according to https://github.com/zed-industries/zed/issues/14411#issuecomment-2227324916 clangd needs extra options to out out of C++ mode.

I think we should have these settings set in Zed for C by default.

susandahal commented 1 month ago

Can you share any relevant settings?

* ~/.config/zed/settings.json (relevant `lsp` or `languages`:`c` blocks if present)

* ~/.config/clangd/config.yaml (if present)

* .zed/settings.json (if relevant)

* .clangd (I don't see one in your project, but check parent directories too (potentially including ~/.clangd) as clangd will load from parent dirs too.

I cant find the last 3 files. In the settings.json there is inline_completition_provider as false. Nothing else is relevant.