[clang-tools-extra] [clangd] Support symbolTags for document symbol (PR #113669)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 29 19:16:58 PST 2024
chouzz wrote:
@travkin79
Are you using the latesed commit? It works in my local clangd with given example.
```
I[11:05:17.623] --> reply:textDocument/documentSymbol(11) 3 ms
V[11:05:17.624] >>> {"id":11,"jsonrpc":"2.0","result":[{"detail":"const int","kind":13,"name":"g_var","range":{"end":{"character":19,"line":0},"start":{"character":0,"line":0}},"selectionRange":{"end":{"character":15,"line":0},"start":{"character":10,"line":0}},"tags":[21,20]},{"children":[{"detail":"void ()","kind":6,"name":"pub","range":{"end":{"character":14,"line":3},"start":{"character":4,"line":3}},"selectionRange":{"end":{"character":12,"line":3},"start":{"character":9,"line":3}},"tags":[19,5]},{"detail":"void ()","kind":6,"name":"pri","range":{"end":{"character":14,"line":5},"start":{"character":4,"line":5}},"selectionRange":{"end":{"character":12,"line":5},"start":{"character":9,"line":5}},"tags":[19,2]},{"detail":"void ()","kind":6,"name":"pro","range":{"end":{"character":14,"line":7},"start":{"character":4,"line":7}},"selectionRange":{"end":{"character":12,"line":7},"start":{"character":9,"line":7}},"tags":[19,4]}],"detail":"class","kind":5,"name":"P","range":{"end":{"character":1,"line":8},"start":{"character":0,"line":1}},"selectionRange":{"end":{"character":7,"line":1},"start":{"character":6,"line":1}},"tags":[20]}]}
```
And I am going to update the branch to remove `Constant`.
> Could you please check your implementation if the symbol tags are only created for diagnostics? If that's the case, could you please add symbol tags also for the following LSP methods and LSP types?
Currently, the implementation should only work in DocumentSymbol(outline). BTW, I tested in vscode, I am not sure why it also in `textDocument/publishDiagnostics`, could you please upload the full verbose logs of clangd? As for other features, I am going to add it after supported DocumentSymbol.
https://github.com/llvm/llvm-project/pull/113669
More information about the cfe-commits
mailing list