cquery-project / vscode-cquery

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

Occurences of variable not highlighted when building with cmake #18

Closed DaanDeMeyer closed 6 years ago

DaanDeMeyer commented 6 years ago

I've been working on building cquery with cmake and encountered a problem. Vscode does not highlight occurrences of the same variable when it is built with cmake. If built with waf occurrences of the same variable are highlighted without any problems. The strange thing is that cquery does not crash and I can't see out of the ordinary in the logs. All the other features work as expected (Find Usages, go to definition, diagnostics, ...)

Both the waf and cmake built cquery binaries are linked against downloaded clang (rest of libraries are also the same).

Any idea what could cause vscode to not highlight occurrences of the same variable?

OS: Arch Linux

jacobdufault commented 6 years ago

Try clearing out the cache and rebuild it from scratch, maybe you're reusing the one from waf.

DaanDeMeyer commented 6 years ago

That didn't fix it.

I checked the logs from both the waf and the cmake build and in the waf build I get Running textDocument/documentHighlight took 0.105ms every time I click on a variable but in the cmake build I get none of these logging messages.

EDIT: textDocument/codeLens is not executed either when using the cmake binary

DaanDeMeyer commented 6 years ago

Nvm I found it, I missed them when adding all the files to the cmake sources list. I'm surprised everything compiled without problems