Skip to content

Native Rust editor responses ignore snippet and workspace-edit client capabilities #1516

Open

Description

@alex09x

Problem

P2; source-revalidated on main 3f2a835c78e9daba7baefc4c018c6fc9ca3c6e4a.

completion_config always enables SnippetCap and FillArguments; completion_item emits insertTextFormat=2 for snippets. workspace_edit always emits documentChanges, including create/rename operations. Gateway lsp_editor_request sends only method and params to the engine and forwards the result unchanged; it does not negotiate these response forms from initialize capabilities.

Location: crates/prod-code-engine-rust/src/editor/mapping.rs:25-39; crates/prod-code-engine-rust/src/editor/snapshot.rs:291-323.

Reproduction boundary

Initialize with capabilities={} and request function completion plus a text-only resolved assist. The paths can produce snippet placeholders and documentChanges although the client did not advertise support. A create/rename assist can additionally require unadvertised resourceOperations. Verify a minimal-capability client and a fully capable client separately.

These are source-derived predictions, not a newly executed LSP session or runtime result. Relevant paths are unchanged from the inspected audit checkout; no tests, builds or server restarts ran during this audit.

Expected behavior

Carry negotiated capabilities per editor session. Emit plain completion text when snippets are unsupported; use changes for text-only edits when documentChanges is unsupported, and do not offer unsupported resource operations. The official WorkspaceEdit specification defines these capability-dependent forms.

Original findings

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggatewayServer daemon

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions