Skip to content

Commit bcd7570

Browse files
committed
Release PHPantom 0.3.1
Add client-side PHP document symbol augmentation so VS Code and Cursor Sticky Scroll can show the active named function or method while scrolling long PHP files. The language client now preserves PHPantom language-server symbols and fills in missing function and method ranges from the open document. Bump the extension and lockfile to 0.3.1 and document the release in the changelog. Verification: npm run check; npm run package
1 parent 367616c commit bcd7570

5 files changed

Lines changed: 587 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.3.1 - 2026-05-15
4+
5+
- Added PHP outline augmentation so named functions and methods can appear in Sticky Scroll.
6+
37
## 0.3.0
48

59
- Added a PHPantom status bar item for server state and output-channel access.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "phpantom",
33
"displayName": "PHPantom",
44
"description": "Fast PHP language server with Laravel and PHPStan-aware type intelligence.",
5-
"version": "0.3.0",
5+
"version": "0.3.1",
66
"publisher": "CicerBro",
77
"license": "MIT",
88
"icon": "assets/spookaphant.png",

src/client.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Trace
88
} from "vscode-languageclient/node";
99
import { resolveServerBinary } from "./downloader";
10+
import { augmentPhpDocumentSymbols } from "./phpSymbols";
1011

1112
export interface StartedClient {
1213
client: LanguageClient;
@@ -55,6 +56,12 @@ export async function startClient(
5556
traceOutputChannel: outputChannel,
5657
synchronize: {
5758
configurationSection: "phpantom"
59+
},
60+
middleware: {
61+
async provideDocumentSymbols(document, token, next) {
62+
const symbols = await next(document, token);
63+
return augmentPhpDocumentSymbols(document, symbols);
64+
}
5865
}
5966
};
6067

0 commit comments

Comments
 (0)