vitejs / vitejs/launch-editor

Remote support

Open
#72 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
721
Forks
94
Avg merge
2h 11m
Merged PRs (30d)
5

Description

When working from home, I connect to my office computer using vscode Remote Development feature. Currently the launch-editor uses -r -g arguments to open vscode but when working with remote development we need a different set of arguments. Otherwise it tries to find and open the file on the local machine (which does not exist)

https://github.com/yyx990803/launch-editor/blob/master/packages/launch-editor/get-args.js#L43

    case 'code':
    case 'Code':
    case 'code-insiders':
    case 'Code - Insiders':
    case 'codium':
    case 'vscodium':
    case 'VSCodium':
      return ['-r', '-g', `${fileName}:${lineNumber}:${columnNumber}`]

When working with remote development the arguments need to be these:

$ code -r --remote ssh-remote+192.168.0.17 -g /home/martin/nuxt/components/HelloWorld.vue:3

The 192.168.0.17 is the name of the host found in ~/.ssh/config. I guess this part would need to be configurable or passed as query arg like /__open-in-editor?file=src/main.js&remote=NAME_OF_REMOTE

The --remote option wasn't well documented, it does not show up when you type code --help but I found it on this issue and it does indeed work - https://github.com/microsoft/vscode-remote-release/issues/5083

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/launch-editor/get-args.js, especially the VS Code cases shown in the issue, then trace how editor arguments and request values are passed through launch-editor. Define how the remote host is configured or supplied, and verify that remote development produces the requested --remote and -g arguments without changing existing local behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.