Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Support per file compiler commands as "YouCompleteMe" #161

Open
athei opened this issue Oct 7, 2017 · 3 comments
Open

Support per file compiler commands as "YouCompleteMe" #161

athei opened this issue Oct 7, 2017 · 3 comments

Comments

@athei
Copy link

athei commented Oct 7, 2017

I use https://github.com/rizsotto/Bear to generate per file compiler commands that I use with YouCompleteMe. I noticed that this results in almost no errors when used with the linux kernel in comparison to the https://github.com/rdnetto/YCM-Generator generated config file.

My request is to support the resulting compile_commands.json file format with color_coded to have more accurate coloring.

@jeaye
Copy link
Owner

jeaye commented Oct 7, 2017

Hey, thanks for the ticket and interest in color_coded. As of #99, we should have support for compile_commands.json. Also, color_coded supports, on its own, per-directory compilation flags by simply allowing you to place a .color_coded file in the directory with whichever source is being compiled.

Have you run into any specific issues with these?

@athei
Copy link
Author

athei commented Oct 8, 2017

I have the compile_commands.json in my kernel tree root. When I open a file for example mm/zpool.c I have no highlighting. When I enter :CCerror I get: internal error: cannot retrieve location

Do I still need a .color_coded file?

@UnrealQuester
Copy link
Collaborator

It looks like color_coded cannot get the start and end location of the file we are currently compiling. We create temp files for compiling the code in the current buffer. Can you check if they were created successfully? If you have the file open there should be a directory starting with color_coded in /tmp.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants