Engine (`cmd/lsp_nav.rs`, on the pending outcomes of 20d1d28):
- `lsp.definition` (F12) and `lsp.references` (Shift+F12, sorted, with
line previews) return project-relative locations; locations outside
the project, such as PHAR stubs and symlink escapes, are dropped.
- `lsp.prepareRename` uses the word at the cursor when the server has
no prepareProvider.
- `lsp.rename` (F2) applies the workspace edit (`lsp_nav/edit.rs`):
1. Check everything first: inside the project, ranges fit (UTF-16,
CRLF), open buffers unchanged since the request, no file
operations, no incomplete edit.
2. Write closed files atomically through the VFS, restoring earlier
writes when a later one fails.
3. Change open buffers through `buffer.edit` (dirty, undoable).
4. Send each written file to Phpactor as didOpen/didSave/didClose
plus didChangeWatchedFiles; without this its index kept the old
names. Then the summary notification `notification.lsp.renamed`.
UI (`components/editor/nav/`):
- Mod+click goes to the definition, with a pointer cursor while Mod is
held.
- A location picker for several definitions (exclusive modal).
- A References tab in the bottom panel, grouped by file.
- An inline rename field with a use/file count (exclusive modal).
- `BufferSync.beginUndoableRemote` puts the engine's rename edit into
the editor history as one undo step per buffer.
- Catalog strings and tokens only.
Fake LSP server: `--script FILE` with scripted capabilities and
answers (additive next to M3.4's arms).
Tests:
- `crates/engine/tests/lsp_nav.rs` (fake): definition; bad positions;
references; prepareRename; a multi-file rename incl. a closed CRLF
file; refusals for outside the project, a bad range, a stale buffer,
bad names and no server.
- The ignored real-Phpactor test covers definition, references and a
rename and back across 3 files.
- Vitest `ui/tests/nav/`.
Live (Phpactor 2026.06.25.0, Windows, port 7935, tick on):
- definition 93 ms cold / 7-18 ms warm
- references ~140 ms
- prepareRename ~11 ms
- rename 28-59 ms
- index follows written files in 140 ms
- Phpactor 57 MB working set, ~1.6% of a core while ticking idle
Gate: 13 steps, 197 s, Vitest 484 + 1 skipped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
1.4 KiB
Markdown
23 lines
1.4 KiB
Markdown
# PHP language checklist
|
||
|
||
> **Status:** baseline; completion and hover partial via Phpactor (M3.4) · **Last updated:** 2026-10-22 · Reference: php.net and the PHP RFCs
|
||
|
||
- [ ] Parsing of PHP 8.0–8.4 syntax (attributes, match, enums, readonly, first-class callables, property hooks, asymmetric visibility)
|
||
- [ ] Highlighting, including heredoc/nowdoc and embedded HTML
|
||
- [ ] File structure: namespaces, classes, interfaces, traits, enums, functions, constants
|
||
- [ ] Go to declaration and implementation
|
||
- [ ] Find usages (partial, M3.5: find references and go to definition through Phpactor; no scopes, no usage kinds)
|
||
- [ ] Completion: members, functions, classes with auto-import, keywords
|
||
- M3.4 (2026-10-22): partial, from Phpactor: members after `->`/`::`, variables, classes and keywords with hover documentation and signature help; imports applied when Phpactor sends them. No type inference of Lutra's own.
|
||
- [ ] Type inference from declarations, PHPDoc, generics in PHPDoc
|
||
- [ ] Diagnostics: syntax errors, undefined symbols, type mismatches
|
||
- [ ] Refactorings: rename (partial, M3.5: through Phpactor with an inline field; no preview list), extract variable/method, move class, change signature
|
||
- [ ] Formatting to PSR-12 / PER coding style
|
||
- [ ] PHPDoc generation and completion
|
||
|
||
## Revision history
|
||
|
||
| Date | Change | Summary |
|
||
|---|---|---|
|
||
| 2026-10-22 | minor | Completion partial via Phpactor (M3.4) |
|
||
| 2026-10-13 | major | Baseline |
|