Closed shimbay closed 1 month ago
Can't reproduced.
textDocument/semanticTokens/full(2) 682 ms, error: Task was cancelled
This's semantic highlighting request, has nothing related with reference.
Run :call CocAction('jumpReferences')
on the symbol you want to jump, trace the logs.
I[11:07:14.057] <-- textDocument/references(9)
V[11:07:14.057] ASTWorker running References on version 1 of /data/sunyunbo/workspace/src/xxx/sdk/yyy/src/handle/yyy_handle.h
I[11:07:14.058] --> reply:textDocument/references(9) 1 ms
V[11:07:14.058] >>> {"id":9,"jsonrpc":"2.0","result":[{"range":{"end":{"character":24,"line":51},"start":{"character":19,"line":51}},"uri":"file:///data/sunyunbo/workspace/src/xxx/sdk/yyy/src
I[11:07:14.058] --> textDocument/clangd.fileStatus
V[11:07:14.058] >>> {"jsonrpc":"2.0","method":"textDocument/clangd.fileStatus","params":{"state":"idle","uri":"file:///data/sunyunbo/workspace/src/xxx/sdk/yyy/src/handle/yyy_handle.h"}}
V[11:07:14.399] <<< {"id":10,"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":19,"line":51},"textDocument":{"uri":"file:///data/sunyunbo/workspace/src/npu-codeba
I[11:07:14.399] <-- textDocument/documentHighlight(10)
V[11:07:14.399] ASTWorker running Highlights on version 1 of /data/sunyunbo/workspace/src/xxx/sdk/yyy/src/handle/yyy_handle.h
I[11:07:14.400] --> reply:textDocument/documentHighlight(10) 0 ms
V[11:07:14.400] >>> {"id":10,"jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":24,"line":51},"start":{"character":19,"line":51}}}]}
I[11:07:14.400] --> textDocument/clangd.fileStatus
V[11:07:14.400] >>> {"jsonrpc":"2.0","method":"textDocument/clangd.fileStatus","params":{"state":"idle","uri":"file:///data/sunyunbo/workspace/src/xxx/sdk/yyy/src/handle/yyy_handle.h"}}
reference in the same file is ok, but if reference in other files, coc-reference does not work. i have checked compile_commands.json, it seems nothing wrong.
it seems other file does not loaded by clangd
reference in other files, coc-reference does not work
Have no idea about this, maybe clangd related. coc.nvim/coc-clangd sends references request to clangd server, the server responded with locations and the client side displays them.
@fannheyward I am pretty sure the reference works correctly with llm 14.0.0 and a old version coc before upgrading.
Now, I downgrade the llvm back to 14.0.0, and use with the latest coc, reference is still not working.
I also found some weird behavior, the background indexing is not work if i donot specify the --compile-commands-dir
similar disscussion here
it`s solved, https://github.com/clangd/clangd/issues/503, my home dir is a symbol link, clangd has a bug to process it correctly.
coc reference not working after coc / coc plugins upgrade
coc-setting
Logs Please attach the clangd log from
:CocCommand workspace.showOutput
if you can. If possible, run with--log=verbose
- note that the logs will include the contents of open files!System information Clangd version (from the log, or
clangd --version
): clangd extension version (from:CocInfo
):Operating system: