starlark-rust icon indicating copy to clipboard operation
starlark-rust copied to clipboard

feat: support document symbols requests in lsp

Open MaartenStaa opened this issue 5 months ago • 0 comments

This allows requesting a list/tree of symbols in the current document. The following items are currently exposed:

  • load statements:
    • The module path
    • The loaded symbol names
  • def statements:
    • The function node
    • Argument names
  • Closures, when assigned to a named variable
  • Structs (calls to struct), when assigned to a named variable
  • Build system targets (function calls containing a name argument)

Example from starlark_syntax/testcases/parse/android_sdk_repository_template.star:

Screenshot 2024-03-12 at 14 37 51

MaartenStaa avatar Mar 12 '24 13:03 MaartenStaa