Final cross-file layer: filesystem resource operations in
documentChanges, applied in server order alongside text edits.
- src/rename.rs: replace the files/unsupported_ops split with a
single ordered Vec<WorkspaceOp> (Edit | Create | Rename | Delete
with options). Order preserved exactly as sent so create-before-
edit works; the `changes` map still emits URI-sorted edit ops.
files()/is_empty()/edit_count()/resource_op_count() helpers.
Tests reworked to the ops model.
- src/code_action.rs: adapt to the ops model (has_edit unchanged).
- src/lua_bindings.rs: workspace_ops_to_lua (ordered, op-tagged) +
file_edits_to_lua (back-compat); pmacs.rename.ops;
_parse_workspace_edit -> { ops }; code-action edit is ops; new
pmacs.buffer.apply_resource_op doing the filesystem op plus
buffer-registry reconciliation (rename rebinds an open buffer's
path; delete removes its buffer; create makes parent dirs and
honours overwrite/ignoreIfExists).
- builtin/runtime/lsp.lua: apply_workspace_edit rewritten to walk
the ordered ops, preflight-resolve every URI before mutating
anything, run text edits via apply_text_edits and resource ops
via apply_resource_op, restore origin best-effort. Returns
edits, files, resource_ops; status messages updated.
- pmacs_fake_lsp.rs: drop the stray /tmp create from `rename`
mode; add a `resourceops` mode whose executeCommand->applyEdit
returns create -> edit-created -> rename -> delete.
- tests/m4_acceptance.rs: m4_15 drives all four ops through the
applyEdit pump and asserts disk effects + create-before-edit
ordering.
Gates: lib 1274/0, m4 70/0, m8_1 10/0, m8_9 26/0, m8_10 19/0,
m9_1 18/0, m11_5 (--features crdt) 2/0; fmt + clippy clean.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>