X Tutup
Skip to content

Incremental text document updates#3010

Open
dantleech wants to merge 3 commits intomasterfrom
incremental-updates
Open

Incremental text document updates#3010
dantleech wants to merge 3 commits intomasterfrom
incremental-updates

Conversation

@dantleech
Copy link
Collaborator

@dantleech dantleech commented Dec 29, 2025

Instead of the IDE passing the entire document each time it will now (by default?) pass only the text edits.

This will reduce I/O (nobody cares unless running over a slow network) but it will also open the possibltiy of incrementally updating the AST.

Instead of the IDE passing the entire document each time it will
now (by default?) pass only the text edits.

This will reduce I/O (nobody cares) but it will also open the possibltiy
of incrementally updating the AST.
@dantleech dantleech marked this pull request as ready for review December 29, 2025 22:14
"phpactor/phly-event-dispatcher": "^2.2.0",
"phpactor/language-server": "^7.0.1",
"phpactor/language-server-protocol": "^3.17.4",
"phpactor/language-server": "dev-master",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tag the LS

return new TextDocumentHandler($container->get(EventDispatcherInterface::class));
return new TextDocumentHandler(
$container->get(EventDispatcherInterface::class),
TextDocumentSyncKind::INCREMENTAL,
Copy link
Collaborator Author

@dantleech dantleech Dec 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this configurable? although i'm not sure why we'd want to beyond offering an initial opt-in or fallback if it doesn't work as expected.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In worst case we can revert it before next release.

@dantleech dantleech changed the title Incremental updates WIP Incremental updates Dec 29, 2025
@dantleech dantleech changed the title Incremental updates Incremental text document updates Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup