Skip to content

Add TRAMP / remote host support - #270

Merged
ericdallo merged 8 commits into
editor-code-assistant:masterfrom
andilavera:andi/tramp
Jul 11, 2026
Merged

ericdallo merged 8 commits into
editor-code-assistant:masterfrom
andilavera:andi/tramp

Conversation

@andilavera

@andilavera andilavera commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Adds support for launching ECA in TRAMP buffers when the buffer's default-directory is remote.

TRAMP prefixes are stripped before sending paths to the server. Inbound, server paths are matched against the session's workspace folders to reconstruct the correct TRAMP paths. Explicit entries in eca-local-to-remote-prefix-map always take priority over auto-derived mappings.

Auto-install is skipped in TRAMP buffers. I was struggling to get this working.

Changes

  • Remote process resolution: Binary discovery and version checks are remote-aware
  • Automatic path mappings: Workspace folders with TRAMP prefixes automatically become translation entries. The mapping layer merges explicit user configuration with these derived mappings, with explicit always winning on ties
  • Testing: Eight new test cases cover TRAMP prefix stripping
  • Docs: Added a TRAMP / remote hosts section

andilavera and others added 8 commits July 10, 2026 11:56
Merge explicit prefix-map entries with implicit
mappings from TRAMP folders. Strip TRAMP prefixes
in local-to-remote so the server sees local paths.
Add a "TRAMP / remote hosts" section explaining that auto-install is
local only, users must install eca on the remote PATH or set
eca-custom-command, and that path mappings are derived from TRAMP
workspace folders automatically.
Refuse auto-download on remote TRAMP hosts and show a clear error
message directing users to install eca on the remote PATH or set
eca-custom-command.  Use executable-find with REMOTE argument to
search the remote PATH, and make server-version detection
TRAMP-aware by running --version through the remote shell when
the binary lives on a remote host.
@ericdallo
ericdallo merged commit 2176eed into editor-code-assistant:master Jul 11, 2026
15 checks passed
ericdallo added a commit that referenced this pull request Jul 11, 2026
Path mappings were derived via (eca-session), which resolves from the
current buffer, so server messages handled while an unrelated buffer
was current could pick the wrong session's mappings (or none). Bind
the owning session dynamically while handling server messages.

Also anchor the server version check at the session workspace so
eca-version/eca-doctor report the remote binary for TRAMP sessions,
restore defcustom indentation, and add a changelog entry for #270.

🤖 Generated with [ECA](https://eca.dev) (nubank-anthropic/fable-5 - max)

Co-Authored-By: eca-agent <git@eca.dev>
@ericdallo

Copy link
Copy Markdown
Member

Thank you, will do small changes but overall looks good

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