cquery
cquery copied to clipboard
documentHighlight doesn't return read or write kind
textDocument/documentHighlight returns positions of the symbol under the cursor, with a kind of Text, Read or Write. Looking at the source, cquery should support returning Read or Write:
https://github.com/cquery-project/cquery/blob/af7f14cc63c2be38e0918c05204d06136d519360/src/messages/text_document_document_highlight.cc#L51-L56
However for some reason it doesn't, or to be more precise it always returns "kind":1 (which is Text). Reproducible both on actual projects and on simple test files like the following:
int main() {
int foo = 1; // This should be Write.
int bar = foo; // This should be Read for foo.
return 0;
}
The problem is that nobody changes the role field when it is a write or read case in the code so it is taking only the else path.