ncm2 / ncm2-pyclang

Cached, fast C/C++ completion for ncm2
MIT License
45 stars 1 forks source link

[TODO] more flexible compile arguments config, maybe with some python? #18

Open roxma opened 5 years ago

roxma commented 5 years ago

I'm working on a very sophisticated C project.

Modifying the build script to generate compile_commands.json is not a good idea and I don't want to update a team repo for my custom dev env.

Using .clang_complete is not enough.

fcying commented 5 years ago

put compile_commands.json into .git dir, and let it support environment variables?

roxma commented 5 years ago

@fcying

put compile_commands.json into .git dir,

let g:ncm2_pyclang#database_path = [
            \ 'compile_commands.json',
            \ 'build/compile_commands.json',
            \ '.git/compile_commands.json'
            \ ]
roxma commented 5 years ago

@fcying you could also use global gitignore instead of throwing things into .git directory.

$ cat ~/.gitconfig 
[core]
    excludesfile = ~/.gitignore_global

$ cat ~/.gitignore_global 
/.envrc
.clang_complete
tags
compile_commands.json