cquery-project / vscode-cquery

cquery plugin for Visual Studio Code
54 stars 16 forks source link

Provide a way to restart cquery #39

Closed Yanpas closed 6 years ago

Yanpas commented 6 years ago

Currently any change in compile_commands won't be relfected in cquery resulting that you need to reload vscode workspace. At the same time killing cquery process restarts cquery, but the restarted version is unusable since it generates a lot of warning if you edit the code.

rocuh commented 6 years ago

Just tried this hoping it would basically reload the compile_commands.json file and reindex. It didn't seem to do that, and I found syntax highlighting seemed to stop working properly after the restart command.

I found rather than doing

      languageClient.stop();
      languageClient = getLanguageClient();

doing this instead

languageClient.sendNotification('workspace/didChangeConfiguration');

got the what I would have expected of a restart.

Yanpas commented 6 years ago

I found syntax highlighting seemed to stop working properly after the restart command

I faced the same when I simply killed cquery process and the new spawned one didn't work properly

rocuh commented 6 years ago

sending the above notification definitely works it reloads the json and after it completed its jobs i got the correct inactive #ifdef'd regions for the build that generated the json which is what i was after.

Yanpas commented 6 years ago

I think this issue deserves separate ticket

Yanpas commented 5 years ago

@roceh I've opened issue #50