Commit d0f9077
feat(completion): array callable method completion
Add method name completion inside array callable strings. When the
cursor is inside the method-name string of [Class::class, '|'] or
[$obj, '|'], the LSP now offers method completions from the resolved
class.
Detection handles ::class constants, $this, typed variables,
namespaced classes, whitespace variations, and unclosed strings.
Completion reuses the standard member-completion builder so items have
identical formatting to regular -> / :: member completions: label
details, return type, deprecation tags, and data for lazy documentation
resolve. Insert text is post-processed to strip snippet parentheses
since we are inserting into a string literal.
Works with both instance and static methods.
Signed-off-by: Anders Jenbo <anders@jenbo.dk>1 parent 9c304a5 commit d0f9077
6 files changed
Lines changed: 691 additions & 0 deletions
File tree
- docs
- src/completion
- tests/integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
0 commit comments