-
Notifications
You must be signed in to change notification settings - Fork 58
feat(code-server): install extensions from .vscode/extensions.json
#231
feat(code-server): install extensions from .vscode/extensions.json
#231
Conversation
.vscode/extensions.json
.vscode/extensions.json
.vscode/extensions.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
fi | ||
|
||
if ! command -v jq > /dev/null; then | ||
echo "jq is required to install extensions from a workspace file." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is overkill, but we could use the Node bundled with code-server.
extensions=$("$INSTALL_PREFIX/lib/node" -e "require(\"$WORKSPACE_DIR/.vscode/extensions.json\").recommendations.forEach((r) => console.log(r))")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. I do like jq
, but if we know the path to node
and it should always be present, then it makes sense.
@code-asher i am not 100% convinced about the flag I will back port these features to the |
I think code-server/VS Code already offers to install the recommended extensions after you open a project, right? But this can cut down on the perceived time it takes to get coding, so I feel it is a worthwhile addition. |
More of the naming of the flag. I like the intention of this, as it allows for the get repo to specify what it wants. |
Ohh yeah I see, I think the name is good. |
Add a new flag
auto_install_extensions
which auto installed the recommended extensions found in.vscode/extensions.json
Example
.vscode/extensions.json
Example terraform template snippet
Example output
NOTES
jq
to be installed on the workspace.vscode/extensions.json
iffolder
is not setuse_cached
andextensions_dir
together helps)closes #206