I'm using company-mode for completion in C++ code. To tell clang backend of company where the include files for the current project are I have to use the following
((c++-mode (eval setq company-clang-arguments (append company-clang-arguments '("-I/full/path/to/project/root/include"))))
I have to specify the full path always. Is there a way to replace
full/path/to/project/root with a variable that stores the path the the
(c++-mode (eval setq company-clang-arguments (append company-clang-arguments (list concat "-I" default-directory "src")))))
default-directory is evaluated in the file that I'm opening it doesn't return to path the the project root but some other path inside the project.