adds a functional design

This commit is contained in:
2026-10-05 11:10:12 +02:00
parent 201c59c659
commit ed5a227c9d
25 changed files with 2888 additions and 0 deletions
+83
View File
@@ -0,0 +1,83 @@
# Code symbols
Helder knows the PHP classes, interfaces, traits and enums your project declares. `Cmd`+click a class name in the [file view](file-view.md) to see where it is declared and every place that uses it, in a popup in the middle of the window.
[Guide index](index.md) · Related: [File view](file-view.md), [Search](search.md), [Explorer](explorer.md)
## At a glance
```text
+----------------------------------------------------------------+
| (1) App\Models\User (2) 14 references |
+----------------------------------------------------------------+
| (3) DEFINED IN |
| >[php] app/Models/User.php (4)[class] 12 |
| (5) EXTENDS [Authenticatable] |
| IMPLEMENTS [MustVerifyEmail] |
| USES [HasFactory] [Notifiable] |
| (6) USED IN |
| [php] app/Http/Controllers/UserController.php 3 |
| (7) 18 public function show(User $user) |
| 42 $user = User::findOrFail($id); |
| [php] app/Policies/UserPolicy.php 2 |
| 11 public function view(User $user): bool |
+----------------------------------------------------------------+
```
1. **Name**: the class name. With exactly one declaration, the full name with its namespace.
2. **Reference count**: how many lines use the name.
3. **Defined in**: each declaration, with badge, path and line number.
4. **Kind**: `class`, `interface`, `trait` or `enum`.
5. **Relations**: what the declaration extends, implements and uses (traits). Each name is a chip.
6. **Used in**: the files that use the name, each with its number of hits.
7. **Hit**: the line number and the line itself.
## Features
### Find a clickable class name
- Hold `Cmd` while the keyboard is in the code. Every class name the project declares gets a thin amber underline.
- Move the pointer over an underlined name: the pointer turns into a hand.
- Names from `vendor/` count too, so framework classes are clickable.
- The underline shows in PHP files, including Blade templates.
### Open the symbol popup
- `Cmd`+click an underlined class name.
- The popup opens at once and shows "Searching..." until the results are in.
- The popup sits in the middle of the window over a dimmed background.
### Defined in
- Lists every declaration of the name, project files before `vendor/` files, up to 25.
- "No declaration in this project" means the name has no declaration Helder can find.
- Under a declaration, the **EXTENDS**, **IMPLEMENTS** and **USES** rows show related names.
- A related name the project declares lights amber when you hover it. Click it to load the popup for that name. Other names are grey and do nothing.
### Used in
- Lists every line that uses the name, grouped by file. `vendor/` is left out.
- Import lines (`use App\Models\User;`) and the declaration line itself are left out.
- Up to 300 files are listed.
- Click a hit to open that file at that line. Click a file header to open the file at its first hit.
- The line you land on moves to the middle of the pane and flashes amber.
### Move with the keyboard
- `Up` and `Down` move the highlight through the declarations first, then every hit.
- `Enter` opens the highlighted row.
- `Esc`, or a click outside the popup, closes it.
### Keeping up to date
- When files change on disk, Helder rebuilds its list of class names. New classes become clickable without a restart.
## Keyboard
| Keys | Action |
|---|---|
| `Cmd` (hold) | Underline the clickable class names |
| `Cmd`+click | Open the symbol popup for a class name |
| `Up` / `Down` | Move through declarations and hits |
| `Enter` | Open the highlighted declaration or hit |
| `Esc` | Close the popup |
## Related
- [File view](file-view.md): where you `Cmd`+click, and where a result opens.
- [Search](search.md): free-text search across all files.
- [Explorer](explorer.md): the opened file is revealed in the tree.