Skip to content

Commit ae29506

Browse files
committed
Update readme
1 parent 32681be commit ae29506

1 file changed

Lines changed: 29 additions & 3 deletions

File tree

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,19 @@ A fast, lightweight PHP language server that stays out of your way. Using only a
1212
- **Static members** via `::` — static methods, static properties, constants, enum cases
1313
- **`parent::`** — inherited and overridden members (excludes private)
1414
- **Traits and interfaces** — trait members appear on the using class; interface contracts are resolved
15-
- **`@mixin` classes** — members from `@mixin` annotations are included, even when the mixin is declared on a parent class (the Laravel `Model`/`Builder` pattern works out of the box)
15+
- **`@mixin` classes** — members from `@mixin` annotations are included
1616
- **Magic members**`@property`, `@property-read`, `@method` from PHPDoc
1717
- **Method chaining** — return types are followed through arbitrarily long chains
1818
- **Null-safe chaining**`?->` is handled identically to `->`
1919
- **Full signatures** in completion labels (parameters, types, return type)
20-
- Magic methods (`__construct`, `__destruct`, etc.) are filtered out of results
20+
- Magic methods (`__construct`, `__call`, etc.) are only suggested interally
21+
- **Named argument completion** — when typing inside call parentheses, parameter names are suggested with a trailing `:`.
22+
- **PHPDoc tag completion** — context-aware suggestions inside `/** … */` blocks.
23+
- **Variable name completion** — typing `$` suggests variables that are in scope.
24+
- **Class name completion** — unqualified and partially-qualified class names are completed from the current file
25+
- **Function completion** — standalone functions are completed
26+
- **Constant completion** — constants defined via `define()` are offered alongside class names
27+
- **Deprecated detection** — members, classes, and functions marked with `@deprecated` in their PHPDoc are shown with strikethrough in the completion list
2128

2229
<img width="683" height="339" alt="image" src="https://github.com/user-attachments/assets/65e8220d-5d94-466f-aea7-2f239a8d4b19" />
2330

@@ -27,6 +34,7 @@ A fast, lightweight PHP language server that stays out of your way. Using only a
2734
- **Methods, properties, constants** — resolves through inheritance, traits, and mixins
2835
- **Standalone functions** — including PHP built-ins via embedded stubs
2936
- **Variables** — jumps to the most recent assignment or declaration (assignment, parameter, `foreach`, `catch`, `static`/`global`)
37+
- **Property type definition** — when the cursor is on a property or parameter at its declaration site, jumps to the class definition of its type hint
3038
- **Namespace resolution** — fully-qualified, partially-qualified, and aliased names via `use ... as ...`
3139

3240
### Type Resolution
@@ -53,8 +61,26 @@ Completion results adapt to runtime type checks. PHPantomLSP narrows union types
5361

5462
### Composer & Project Awareness
5563

56-
- Parses `composer.json` for PSR-4 and file autoload mappings
64+
- Parses `composer.json` for PSR-4, classmap, and file autoload mappings
5765
- Resolves cross-file class lookups on demand
66+
- Discovers classes and functions from `require_once` files
67+
68+
> **Note:**
69+
> - Run `composer install -o` (or `composer dump-autoload -o`) to generate autoload files needed for full class completion.
70+
> - If your project doesn’t use Composer, you can create a minimal `composer.json` to generate a classmap:
71+
>
72+
> ```json
73+
> {
74+
> "autoload": {
75+
> "classmap": ["src/"]
76+
> }
77+
> }
78+
> ```
79+
>
80+
> Then run:
81+
> ```bash
82+
> composer dump-autoload -o
83+
> ```
5884
5985
## Building
6086

0 commit comments

Comments
 (0)