3 ms·
What I do currently is run an LS per repo with its configuration stored in the repo, so: + ~/repos/repoA | - CMakeLists.txt | - compile_commands.json ->
by Asooka 6y ago
What I do currently is run an LS per repo with its configuration stored in the repo, so:
+ ~/repos/repoA
| - CMakeLists.txt
| - compile_commands.json -> ../../build/repoA_config1/compile_commands.json
|
+ ~/build/repoA_config1
| - CMakeCache.txt
| - build.ninja
| - compile_commands.json
|
+ ~/build/repoA_config2
| - CMakeCache.txt
| - build.ninja
| - compile_commands.json
etc. for repoB, C, ...
That said I'm thinking on flipping it around - keep the LS configuration in the build folder, and symlink the source folder in it. That way I can have several different configurations in effect at once and switch between them easily. Currently I have to change where compile_commands.json points to if I want to change YouCompleteMe's completions.
Your editor should manage the language server and you should just have to provide the configuration it expects in the directory you start it in.