Support document symbols (`textDocument/documentSymbol`)
withered-magic opened this issue · comments
withered-magic commented
Ezekiel Warren commented
I'm curious if "document symbols" in starlark would include bazel/buck targets?
i.e. would this
_some_local_var = []
cc_library(name = "some_target")
result in these symbols?
_some_local_var
:some_target
same question for "workspace symbols" https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_symbol
withered-magic commented
Yep, that's what I'm envisioning! Although the initial implementation here would likely use the same heuristic that goto def for labels currently uses and derive the list of targets from call expressions that have a name
argument (as opposed to using bazel query
or something)