Skip to content

How to add additional include paths in compile_commands.json or equivalent? #3299

@erusyd

Description

@erusyd

I'm developing embedded c/c++ applications using eclipse which uses CMake to build projects. I can set CMake to generate compile_commands.json, but it seems that it does not include all the necessary include paths and thus emacs lsp show "xxx/xxx.h" file not found.

So my question is:
How to add those missing paths into compile_commands.json to assist lsp-mode to index header files? Or is there any other mechanism to support lsp-mode to find extra include path?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions