mirror of https://github.com/astral-sh/ruff
This PR adds support for "document symbols" and "workspace symbols" language server features. Most of the logic to implement these features is shared. The "document symbols" feature returns a list of all symbols within a specified source file. Clients can specify whether they want a flat or hierarchical list. Document symbols are typically presented by a client in an "outline" form. Here's what this looks like in VS Code, for example. <img width="240" height="249" alt="image" src="https://github.com/user-attachments/assets/82b11f4f-32ec-4165-ba01-d6496ad13bdf" /> The "workspace symbols" feature returns a list of all symbols across the entire workspace that match some user-supplied query string. This allows the user to quickly find and navigate to any symbol within their code. <img width="450" height="134" alt="image" src="https://github.com/user-attachments/assets/aac131e0-9464-4adf-8a6c-829da028c759" /> --------- Co-authored-by: UnboundVariable <unbound@gmail.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||