Skip to content

Code actions import the wrong headers for C functions #16221

@Nickname064

Description

@Nickname064

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

When writing a C program, if you try to use a function that has an equivalent C++ header, and use code actions to try to auto-import the corresponding C header, it will import the C++ version instead.

Ex: instead of importing errno.h, it will import cerrno

Environment

Zed: v0.147.2 (Zed)
OS: Linux Wayland arch unknown
Memory: 14.9 GiB
Architecture: x86_64
GPU: AMD Radeon 610M (RADV RAPHAEL_MENDOCINO) || radv || Mesa 24.1.5-arch1.2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    .contrib/good first issueIssue suitable for first-time contributorsarea:language serverAn umbrella label for all language serversarea:languagesAn umbrella label for all programming languages syntax behaviorsarea:languages/cC programming language supportbugDEPRECATED label: use issue type 'Bug' insteadstaleLabel used by `stale` action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions