Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is the argument --builtin-extensions-dir fully supported?#5073

Answeredbyavsthiago
avsthiago asked this question inQ&A
Discussion options

Hi,

I'm trying to set up two locations to store extensions, built-in and user specific ones.

I'm using the following command to start code-server.

code-server --extensions-dir /home/user/.extensions --builtin-extensions-dir /opt/code-server/extensions

I can see and use the extensions inside the--extensions-dir, the problem is with the built in ones. They all appear as disabled and I couldn't find a way to enable them.

This is a comparison of what I see when I use the arg--builtin-extensions-dir with code-server and VS Code locally. VS Code has a button to enable the extension.

Screenshot 2022-04-07 at 17 41 43
Screenshot 2022-04-07 at 17 43 48

Does anybody know if I'm missing something or if the arg--builtin-extensions-dir is still under development?

You must be logged in to vote

FYI, the solution/workaround for me was to install the extensions inside the default built-in extensions folder/usr/lib/code-server/lib/vscode/extensions/. I used the following command.

code-server \ --install-extension hashicorp.terraform@2.20.1 \--install-extension ms-python.python@2022.4.1 \--extensions-dir /usr/lib/code-server/lib/vscode/extensions/

Replies: 4 comments 3 replies

Comment options

Interesting. I see--builtin-extensions-dir used in our tests but it's not printed when you use--help. It may not be passed through correctly.@code-asher any ideas?

You must be logged in to vote
1 reply
@code-asher
Comment options

Hmm it looks to me like we are passing it through. We will have to poke into it more.

Comment options

FYI, the solution/workaround for me was to install the extensions inside the default built-in extensions folder/usr/lib/code-server/lib/vscode/extensions/. I used the following command.

code-server \ --install-extension hashicorp.terraform@2.20.1 \--install-extension ms-python.python@2022.4.1 \--extensions-dir /usr/lib/code-server/lib/vscode/extensions/
You must be logged in to vote
0 replies
Answer selected byavsthiago
Comment options

It is quite unfortunate that this discussion was marked as one that has an answer: the workaround of installing extensions into "system" dir/usr/lib/code-server/lib/vscode/extensions/ is that those extensions then get treated as system ones: they aren't listed as installed extensions, yet they are running and can't be disabled.

I am trying to prepare a docker image with code-server for a group of engineers and we would like to have some set of extensions to be-preinstalled by default, but since every engineer mounts their own directory to${HOME} the default location for user-installed extensions ~/.local/share/code-server/extensions/ thus gets overwritten by their mount and they won't see the pre-installed extensions.
Since I would like to make some extensions preinstalled, but let user disable them if they wish so - I can't use/usr/lib/code-server/lib/vscode/extensions/ as install dir.

You must be logged in to vote
0 replies
Comment options

I've found this ticket about vscode:microsoft/vscode#56614 (comment)
Someone there shared this link to VSCode docs:https://code.visualstudio.com/docs/setup/enterprise#_set-up-vs-code-with-preinstalled-extensions
Does code-server support something like./bootstrap/extensions/ (for linux)?

You must be logged in to vote
2 replies
@code-asher
Comment options

We are not doing anything with extensions, just passing flags straight through to VS Code, so I am not sure. If VS Code supports it in core, then it should work in code-server, but if it is something they add on top of VS Code, then nope.

@code-asher
Comment options

Ah just noticed it says Windows only, so it would definitely not work with Linux, either way.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
4 participants
@avsthiago@jsjoeio@code-asher@smktpd

[8]ページ先頭

©2009-2025 Movatter.jp