jeaye / color_coded

A vim plugin for libclang-based highlighting of C, C++, ObjC
MIT License
870 stars 53 forks source link

Make compile_commands.json paths also absolute. #188

Open mcourteaux opened 4 years ago

mcourteaux commented 4 years ago

This fixes a ton of issues for me. My usual workflow is as follows:

mkdir build
cd build
cmake ..
cd ..
ln -s build/compile_commands.json .

Such that I have sym-linked compile_commands.json file in my project root. This file is automatically synced by the build folder, which is perfect. Color_coded however, does not correctly interpret the paths, as they are all relative to the "working_directory" entry of the compile_commands.json file. My pull request fixes this.