-
Notifications
You must be signed in to change notification settings - Fork 6.2k
-
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?
Beta Was this translation helpful? Give feedback.
All reactions
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 4 replies
-
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?
Beta Was this translation helpful? Give feedback.
All reactions
-
Hmm it looks to me like we are passing it through. We will have to poke into it more.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
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/
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Yes I really appreciate the support and the courage thanks you house 🏠💯🖤 billionaires houses
Beta Was this translation helpful? Give feedback.
All reactions
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
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)?
Beta Was this translation helpful? Give feedback.
All reactions
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
Ah just noticed it says Windows only, so it would definitely not work with Linux, either way.
Beta Was this translation helpful? Give feedback.