Skip to content

Support deterministic relative include path in .clangd file #1038

Description

@cloudhan

It seems there is no mechanism to support relative path expansion. For example

CompileFlags:
  Add:
  - -Iinclude/path/relative/to/.clangd

.clangd file can generally check into the repo, then the repo path will not be deterministic, adding a mechanism to dynamically determine the path will be greatly helpful.

For (a poor) example

Var:
  dot_clangd_path: dirname(__FILE__) 
CompileFlags:
  Add:
  - -I${dot_clangd_path}/include/path/relative/to/.clangd

So when you open some subdirectory, those portion of config will still work correctly.

Note that I never have it work correctly with relative include path. So I do not have idea whether will it work and how it works.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions