Skip to content

[Feat]: how to open folder or server path through code server url param #6662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
daodol opened this issue Feb 4, 2024 · 6 comments
Closed
Labels
enhancement Some improvement that isn't a feature

Comments

@daodol
Copy link

daodol commented Feb 4, 2024

how to open folder or server path through code server url param?
for example https://vscode.dev?folder=xxx

@daodol daodol added the enhancement Some improvement that isn't a feature label Feb 4, 2024
@code-asher
Copy link
Member

code-server also supports the folder query parameter. Are you encountering a bug with it?

@daodol
Copy link
Author

daodol commented Feb 6, 2024

code-server also supports the folder query parameter. Are you encountering a bug with it?

ok,but I didn't find the full documentation on this and I don't know how to use it

@code-asher
Copy link
Member

It is mainly meant to be used with File > Open Folder from within VS Code, but you can construct it manually by pointing it to any directory on the remote machine. https://domain.com?folder=/home/coder/project for example.

@code-asher
Copy link
Member

Closing as stale but feel free to comment if you come back to this.

@code-asher code-asher closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2024
@zby909
Copy link

zby909 commented Oct 15, 2024

It is mainly meant to be used with File > Open Folder from within VS Code, but you can construct it manually by pointing it to any directory on the remote machine. https://domain.com?folder=/home/coder/project for example.

Hello, how can I add a url query so that when I open a folder, I can automatically open a file in it?The folder parameter can only open folders

@code-asher
Copy link
Member

There is no official way to open a file this way. There is an issue to implement this, but it really should be implemented upstream directly in VS Code: #1964

Someone did figure out a workaround, but I am not sure how well it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

3 participants