-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a compile database for YouCompleteMe #14
Comments
Nice! I need to test this out. I guess this could go in the wiki? We need a HACKING file with links to this as well! |
I used the .ycm_extra_conf.py file as you described from https://github.com/Valloric/ycmd/blob/master/cpp/ycm/.ycm_extra_conf.py, but I moved the
I guess standard practice is to check this file into the repository? also, Arch Linux, has bear available as an AUR package so all I had to do there (using yaourt) was:
thanks for figuring this out! |
Yeah, having it packaged by the distro is the easiest way ;)
(or stick to the default - /usr/local) |
I set up Hacking and Contributing pages (https://github.com/gauteh/astroid/wiki/Hacking), this kind of information should go in there once it gets cleaned up a bit. |
I've added the complete scripts to the repository, after we've added this information to the wiki we can close the issue. |
Included more complete instructions in the wiki, so closing here. |
This is more of a little tip for hacking rather than an issue. But I could not find a "hacking" section or file, so I post it here - feel free to put it (modified) somewhere else everyone can find it:
First off the easiest solution is to use a compile_commands.json file. cmake could generate it itself, but astroid uses scons ;) So we need a handy little helper - called Bear.
You then can find a bear executable and a libear.so inside build/src. Furthermore there is an example config located at ~/src/Bear/src/bear.conf. You can copy them wherever you want, I simply left them where they are.
Now go over to your astroid src dir:
and you have your compile_commands.json!
I put that long command into a small shell script - you might guess it, Bear is usable with ANY build script/system/... that actually can print the commands it runs.
Now you need a .ycm_extra_conf.py inside
/src/astroid. I tried the one shipped with neovim/contrib/YouCompleteMe, but that never worked./src/astroid'The one that Valloric uses himself in YouCompleteMe works perfectly fine. It's located at YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py
On line 105 set
compilation_database_folder = '
and you are done! Completions everywhere :)
The text was updated successfully, but these errors were encountered: